GitHub Action
Update major/minor semver
v1.2.1
Latest version
This action updates major/minor release tags on a tag push.
e.g. Update v1
and v1.2
tag when released v1.2.3
.
It works well for GitHub Action. ref: https://help.github.com/en/articles/about-actions#versioning-your-action
Optional. Existing tag to update from. Default comes from $GITHUB_REF
.
Optional. Tag message. Default: Release $TAG
Optional. Create only major version tags. Default: false
Optional. It's no need to specify it if you use checkout@v2. Required for checkout@v1 action.
name: Update Semver
on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
jobs:
update-semver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: haya14busa/action-update-semver@v1
with:
major_version_tag_only: true # (optional, default is "false")
oneliner
$ cat <<EOF > .github/workflows/update_semver.yml
name: Update Semver
on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
jobs:
update-semver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: haya14busa/action-update-semver@v1
with:
github_token: \${{ secrets.github_token }}
EOF