You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate a scoped monotonically increasing sequence number as a git tag, scoped by a namespace and optional key. Useful for build numbering, release tagging, run counts within or not tied to full workflow runs, etc.
Inputs
Name
Description
Type
Required
Default
namespace
Namespace / "category" for the sequence (e.g., build)
string
yes
—
key
Optional key / "sub-scope" within the namespace; if omitted, namespace is used as the sequence name
string
no
—
root_tag
Optional git tag to use as the commit reference for the new tag; defaults to using current branch HEAD
string
no
—
seed
Starting number if no existing tags found
number
no
1
with_cleanup
Whether to delete previous tags matching the sequence
The repository must be checked out with tags fetched (actions/checkout: with: fetch-depth: 0 and fetch-tags: true, or - run: git fetch --tags --prune --unshallow)
Job requires permissions: contents: write to create and delete tags
Use dry_run to preview actions without making changes
Cleanup removes all previous tags matching the sequence, leaving only the newly created tag
Examples
Namespace + Key
with:
namespace: "build"key: "1.2.3"
tag placed on: current branch HEAD (default)
example tag created: build-1.2.3-42 (assuming the previous was -41)
meaning: build number 42 for version 1.2.3
Placing Tag on an Existing "Root Tag" for Easy Reference, Cleanliness, or Disambiguation