Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 with this process is that we can keep adding to theCHANGELOG.md
file in the PR todevelop
.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.