Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releases using GitHub Actions #76

Merged
merged 2 commits into from
Apr 17, 2023
Merged

Conversation

dhwaneetbhatt
Copy link
Contributor

Automated the Release management process for GitFlow process using steps mentioned in this blog.

Changes

  • Unit tests: Now run on NodeJS versions 12, 16 and 18.
  • Bumped up minimum NodeJS version to 12.
  • For automation to work the CHANGELOG.md file has to match the Keep A Changelog format.
  • draft-new-release: This action is triggered manually. It creates a release branch, bumps up versions in package.json and package-lock.json and automatically inserts the latest tag in CHANGELOG.md file. Then creates PRs against master and develop branches. It requires write access to contents and pull_requests permissions, which has been done at the job level. This action can be triggered only by people with write access to the repository.
  • publish-new-release: This action is triggered when PR from release/ or hotfix/ is merged into master branch. It will create a release and tag the commit in master. Additionally we can use this to automatically publish to NPM in the future, but because that action is irreversible, I've avoided it now and we can consider it in the future if required.

With the new changelog format, we now maintain an Unreleased section that will keep the list of all changes that are not yet released. The automation will insert the correct tag and create the links when drafting a new release. One advantage with this process is that we can keep adding to the CHANGELOG.md file in the PR to develop.

These flows have been tested on my fork.

What's Pending

Hotfix creation is not automated yet because we do not see a lot of hotfixes on the modules. We can take it up in the future if required. Until then we can live with a playbook.

@dhwaneetbhatt dhwaneetbhatt self-assigned this Apr 15, 2023
@dhwaneetbhatt dhwaneetbhatt merged commit 0ba0fb2 into develop Apr 17, 2023
@dhwaneetbhatt dhwaneetbhatt deleted the feature/automate-realases branch April 17, 2023 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants