GitHub Action for updating semver tags when a release is published.
SemVer (or Semantic Versioning) is a strategy for versioning with a Major, Minor, and Patch version.
Let's say your latest release is version v1.2.3
.
It's often convenient to have tags for v1.2
and v1
for loose version pinning.
This GitHub Action will update the v1.2
and v1
tags when a new release is published.
Shut up and show me the copy/paste
This action can be used as follows:
- uses: tchupp/actions-update-semver-tags@v1
The most common cause for issues involves a mismatch in expectations.
Please read below to make sure your setup aligns with the assumptions made by this action.
This action expects that the repo has been checked out.
The following snippet from an example job, which can be found below.
...
steps:
- name: Checkout
uses: actions/checkout@v2
...
This action expects that your repo is tagged using semantic versions, ie v1.2.3
This action has no inputs.
name: Release Tagger
on:
push:
tags:
- 'v([0-9]+)\.([0-9]+)\.([0-9]+)'
- 'v([0-9]+)\.([0-9]+)\.([0-9]+)-(alpha|beta|rc)'
release:
types:
- published
- edited
jobs:
update-semver-tags:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update Semver Tags
uses: tchupp/actions-update-semver-tags@v1