Github action to upgrade the package.json version and create a changelog based on PR description that can be triggered in your workflows
This action is intended to work only when executed within a PR. Hence you need to use the following workflow trigger:
on:
pull_request:
The full specification of what you can do with this event is available here: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
Once you have defined what kind of event should trigger it, just add this action to your workflow, it will update your package.json based on your strategy but always based on your reference branch (main by default), it also updates the CHANGELOG.md by concatenating the description of the PR with the existing content of the CHANGELOG.md.
There are several required options for this action that are listed here:
action-package-version-bump/action.yml
Lines 4 to 28 in 2d8b5f7
An example of how to use it is available here:
action-package-version-bump/.github/workflows/test.yml
Lines 1 to 26 in 2d8b5f7
This is a video of how this action works: