Inputs
All inputs are optional. Click on the Input Name for more Details.
Input | Default Value | Short Description of the Input Value |
---|---|---|
prefix | v | Tag Prefix for Semantic Versions |
major | true | Update Major Tag |
minor | true | Update Minor Tag |
release | false | Update Release Tag |
tags | - | Additional Tags to Update |
tag | github.ref_name | Manually Set Target Tag |
create | false | Create Target Tag |
summary | true | Add Summary to Job |
dry_run | false | Do not Create Tags, Outout Only |
token | github.token | For use with a PAT to Rollback |
See the Examples section for more options.
Details
prefix
To disable the prefix, set it to an empty string prefix: ''
Default: v
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
.
Default: true
release
If you provide a non-release tag 1.2.3-release.1
this would create the release tag 1.2.3
.
Default: false
tags
The prefix
is not applied to specified tags. These can be a string list "v1,v1.0"
or newline delimited |
.
To only update the specified tags
set both major
and minor
to false
. Important
tag
This is the target tag to parse the sha
from. Defaults to the sha
that triggered the workflow. To override this behavior you can specify a target tag here from which the target sha
will be parsed. This is the sha
that all parsed or provided tags
are updated too. Rolling back requires a PAT. See Rolling Back for more details and a manual workflow example.
Default: ${{ github.ref_name }}
create
If true
this will create the tag
at the current sha
of the workflow run.
Default: false
summary
Write a Summary for the job. To disable this set to false
.
👀 View Example Job Summary
Tag | v1.0.1 |
Sha | 9b5d1797561610366c63dcd48b0764f4cdd91761 |
Tags | v1,v1.0 |
Tags
v1
v1.0
Results
Tag | Result |
---|---|
v1 | Updated |
v1.0 | Updated |
SemVer
{
"options": {},
"loose": false,
"includePrerelease": false,
"raw": "v1.0.1",
"major": 1,
"minor": 0,
"patch": 1,
"prerelease": [],
"build": [],
"version": "1.0.1"
}
Inputs
prefix: v
major: true
minor: true
tags: ""
tag: ""
summary: true
dry_run: false
Default: true
dry_run
If this is true
no tags will be created/updated and will only output the results.
Default: false
token
GitHub workflow tokens do not allow for rolling back or deleting tags. To do this you must create a PAT with the repo
and workflow
permissions, add it to secrets, and use it. See Rolling Back for more information and an example.
Default: ${{ github.token }}
Examples
Manually set tags.
- name: 'Update Tags'
uses: cssnr/update-version-tags-action@v1
with:
major: false
minor: false
tags: |
v1
v1.0
Specify the target tag.
- name: 'Update Tags'
uses: cssnr/update-version-tags-action@v1
with:
tag: v1.0.1
WARNING
These docs are not finished. Please see the README.md on GitHub.