binodnepali / react-nepali-datetime-picker

Mobile first collection of components for seamless integration of Nepali calendar, date picker, time picker, and datetime picker functionalities into React applications. Built with simplicity and reusability in mind, powered by React and styled with Tailwind CSS
https://react-nepali-datetime-picker.web.app/
Other
6 stars 3 forks source link

chore: add github action workflow to automate release and package publish #17

Closed binodnepali closed 1 month ago

binodnepali commented 4 months ago

Currently release and package publish are done manually. It would be nice automate the process using github action workflow

aj3sh commented 4 months ago

I want to contribute to this. Can we use release-please?

binodnepali commented 4 months ago

Hey @aj3sh Thanks for your interest to contribute. I would go for commit-and-tag-version which forked version of standard version. Let me your thoughts on it :)

aj3sh commented 4 months ago

Sure @binodnepali, I will take a deep dive into the commit-and-tag-version documentation. I don't see a direct implementation for using it with GitHub Actions. Even they are using release-please for their releases 😆.

In the meantime, if anyone is interested in this issue, please feel free to proceed.

aj3sh commented 4 months ago

@binodnepali, I would like to confirm the scope of this issue:

  1. Create a git tag and GitHub release
  2. Update the changelog file
  3. Publish the package to npm
  4. Create a PR with the release changes (package.json, CHANGELOG.md, etc.)

If I missed anything or added any extras, please let me know.

And on what event do we want to trigger the release workflow?

binodnepali commented 4 months ago

@aj3sh I saw you guys using release-please in node-datetime package. if you would like to proceed with release-please. I am fine with it as well :)

aj3sh commented 4 months ago

@binodnepali, Let's try commit-and-tag-version first.

aj3sh commented 3 months ago

I am able to create releases from commit-and-tag-version through GitHub Actions. I have a question about which event should trigger the release.

Manual Dispatch

Git Tag Push

Main Branch Push

My recommendation is to use Manual Dispatch. Whenever we feel a release is necessary we trigger the release action manually.

cc: @binodnepali

binodnepali commented 3 months ago

I am able to create releases from commit-and-tag-version through GitHub Actions. I have a question about which event should trigger the release.

Manual Dispatch

  • Users manually run the release workflow from the GitHub UI.
  • A release and tag are created.
  • A release PR is generated.

Git Tag Push

  • A user pushes a version tag (Version should be specified).
  • The tag is deleted, and a new tag is created using commit-and-tag-version.
  • A release is created.
  • A release PR is generated.

Main Branch Push

  • This method cannot be used due to recursive action triggers on release PR merge.

My recommendation is to use Manual Dispatch. Whenever we feel a release is necessary we trigger the release action manually.

cc: @binodnepali

Thanks for trying out and providing summary. If you have time, can you open PR with setup? I have look into it.

aj3sh commented 3 months ago

@binodnepali, sorry for the late response. I've been a bit busy lately.

I have created a draft PR. Please review it.