This GitHub Action updates major version tags (e.g. v1, v2) when a tag is pushed or release is created.
For example, when a v1.2.3
tag is pushed it updates the v1
tag to support
the recommended
GitHub Action versioning
release management strategy.
Create a workflow .yml
file in your .github/workflows
directory. An
example workflow is available below. For more information, reference
the GitHub Help Documentation for
creating a workflow file.
# .github/workflows/update-major-version-tag.yml
name: update-major-version-tag
on:
release:
types: [published, edited]
jobs:
update-major-version-tag:
runs-on: ubuntu-latest
steps:
- uses: hongaar/update-major-version-tag@v1
This is a fork of
nowactions/update-majorver with
only a
tiny change
in order to support the release
trigger as well as the push
trigger.
Install dependencies.
npm install
Run tests.
npm test
- Bump up the version in
package.json
- Commit the changes
- Run
npm run release