craig-day/Compute Tag

Compute the next tag based on the previous tag and the version scheme

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Apr 22, 2026
License
BSD

Pinned Snippet

workflow.ymlSHA-pinned
uses: craig-day/compute-tag@4f6e20dc9d852441c4e61a4b3ccadde9511f35f3 # v20

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
github_tokenA Github token for the repo, usually `{{ github.token }}`.yes
tagA manual tag to compute the next version of. If not specified, it will fetch the most recent tag for the repo. no
branchThe branch to find compute the tag for. This requires iteration of all tags for the repo and the commits for the branch to find a tag for a commit on the branch. For large repositories this can be very slow. It is highly recommended that `github_token` be supplied to prevent rate limit errors when searching. no
tag_fetch_depthThe number of most recent tags to fetch when attempting to find a match on the branch.no10
version_schemeThe versioning scheme to use. Currently only supports `continuous` or `semantic`.nosemantic
version_typeIs this a major, minor, patch, or prerelease bump?noprerelease
prerelease_suffixWhat to annotate a prerelease version tag with.nobeta
tag_prefixPrefix for tags. When set, only tags starting with this prefix are considered for version computation, and the prefix is applied to the computed next tag. When unset, existing behavior is preserved (auto-detects 'v' prefix). no
namedescription
next_tagThe computed next tag to be created
previous_tagThe tag that was used to compute next_tag