Automated the Release management process for GitFlow process using steps mentioned in this blog.
Changes
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 of this process is that we can keep adding to the CHANGELOG.md file in the PR to develop.
Automated the Release management process for GitFlow process using steps mentioned in this blog.
Changes
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 inpackage.json
andpackage-lock.json
and automatically inserts the latest tag inCHANGELOG.md
file. Then creates PRs againstmaster
anddevelop
branches. It requires write access tocontents
andpull_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 fromrelease/
orhotfix/
is merged intomaster
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 of this process is that we can keep adding to theCHANGELOG.md
file in the PR todevelop
.