Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
refresh-cw

GitHub Action

Update semver

v1.0.17

Update semver

refresh-cw

Update semver

Updates major/minor release tags on a tag push

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Update semver

uses: rickstaa/action-update-semver@v1.0.17

Learn more about this action in rickstaa/action-update-semver

Choose a version

GitHub Action: Update major/minor semver

Docker Image CI Code quality CI release GitHub release (latest SemVer)

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 can also be used to move the patch version up to the latest commit.

It works well for GitHub Action. ref: https://help.github.com/en/articles/about-actions#versioning-your-action

Inputs

tag

Optional. Existing tag to update from. Default comes from $GITHUB_REF.

message

Optional. Tag message. Default: Release $TAG

major_version_tag_only

Optional. Create only major version tags. Default: false

move_patch_tag

Optional. Moves the existing tag to the latest commit inside the github action. Default: false. Useful when you want to use auto-changelog to automatically add a changelog to your release.

⚠️ In order to prevent unexpected changes this only works when you explicitly specified a tag.

github_token

Optional. It's no need to specify it if you use checkout@v2. Required for checkout@v1 action.

Example usage

name: Update Semver
on:
  push:
    branches-ignore:
      - '**'
    tags:
      - 'v*.*.*'
jobs:
  update-semver:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: rickstaa/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@v2
      - uses: rickstaa/action-update-semver@v1
        with:
          github_token: \${{ secrets.github_token }}
EOF

Contributing

Feel free to open an issue if you have ideas on how to make this GitHub action better or if you want to report a bug! All contributions are welcome. 🚀 Please consult the contribution guideliness for more information.

Acknowledgement

This action is based on @haya14busa's update-major-minor-semver.