craig-day/Compute Tag
Compute the next tag based on the previous tag and the version scheme
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Apr 22, 2026
- License
- BSD
Pinned Snippet
uses: craig-day/compute-tag@4f6e20dc9d852441c4e61a4b3ccadde9511f35f3 # v20tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| github_token | A Github token for the repo, usually `{{ github.token }}`. | yes | — |
| tag | A manual tag to compute the next version of. If not specified, it will fetch the most recent tag for the repo. | no | — |
| branch | The 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_depth | The number of most recent tags to fetch when attempting to find a match on the branch. | no | 10 |
| version_scheme | The versioning scheme to use. Currently only supports `continuous` or `semantic`. | no | semantic |
| version_type | Is this a major, minor, patch, or prerelease bump? | no | prerelease |
| prerelease_suffix | What to annotate a prerelease version tag with. | no | beta |
| tag_prefix | Prefix 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 | — |
Outputs
| name | description |
|---|---|
| next_tag | The computed next tag to be created |
| previous_tag | The tag that was used to compute next_tag |