This GitHub Action updates major version tags (e.g. v1, v2) when semantic versioning tag is pushed.
If v1.2.3
tag is pushed, it updates v1
tag.
It works well with GitHub Action versioning.
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.
name: Update Major Version Tag
on:
push:
tags:
- "v*"
jobs:
update-majorver:
name: Update Major Version Tag
runs-on: ubuntu-latest
steps:
- uses: nowactions/update-majorver@v1
Install dependencies.
npm install
Run tests.
npm test
- Bump up the version in
package.json
- Commit the changes
- Run
npm run release