Update Version Tags on Push or Release for Semantic Versions or Custom Tags.
Automatically maintain both Major 1.x.x
and/or Minor 1.1.x
Tags. For GitHub Actions you can just copy and paste this
workflow: tags.yaml
This is useful if you want to automatically update additional tags, to point to your pushed/released tag.
For example, many GitHub Actions maintain a v1
and v1.x
tags that points to the latest release of the 1.x.x
branch.
Note
Please submit a Feature Request for new features or Open an Issue if you find any bugs.
input | required | default | description |
---|---|---|---|
token | Yes | - | ${{ secrets.GITHUB_TOKEN }} |
prefix | No | v | Tag Prefix (empty to disable) |
major | No | true | Update Major Tag * |
minor | No | true | Update Minor Tag * |
tags | No | - | Specify Tags to Update * |
major/minor - Both major and minor versions are parsed from the release tag using semver
. If you release
version 1.0.0
this will update or create a reference for v1
and v1.0
. If you are not using semantic versions, set
both to false
and provide your own tags
.
tags - The prefix
is not applied to specified tags. These can be a string list "v1,v1.0"
or newline
delimited |
. If you only want to update the specified tags
make sure to set both major
and minor
to false
.
- name: 'Update Tags'
uses: cssnr/update-version-tags-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
output | description |
---|---|
tags | Comma Seperated String of Parsed Tags |
- name: 'Update Tags'
uses: cssnr/update-version-tags-action@v1
id: tags
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Echo Tags'
run: echo ${{ steps.tags.outputs.tags }}
This is the workflow used by this Action to update tags on release: tags.yaml
name: 'Tags'
on:
release:
types: [published]
jobs:
tags:
name: 'Tags'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 'Update Tags'
uses: cssnr/update-version-tags-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Specifying the tags to update:
- name: 'Update Tags'
uses: cssnr/update-version-tags-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
prefix: 'v'
major: false
minor: false
tags: |
v1
v1.0
For general help or to request a feature, see:
- Q&A Discussion: https://github.com/cssnr/update-version-tags-action/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/update-version-tags-action/discussions/categories/feature-requests
If you are experiencing an issue/bug or getting unexpected results, you can:
- Report an Issue: https://github.com/cssnr/update-version-tags-action/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: https://cssnr.github.io/feedback/
Currently, the best way to contribute to this project is to star this project on GitHub.
Additionally, you can support other GitHub Actions I have published:
- VirusTotal Action
- Update Version Tags Action
- Update JSON Value Action
- Parse Issue Form Action
- Mirror Repository Action
- Portainer Stack Deploy
- Mozilla Addon Update Action
For a full list of current projects to support visit: https://cssnr.github.io/