Release Tag
Contract
Prereqs:
- •Run inside this repository git work tree.
- •
gitavailable onPATH. - •
semantic-commitavailable onPATH(used for automated version-bump commit when needed). - •Remote
originconfigured and reachable. - •Release workflow listens on
v*tags:- •
.github/workflows/release.yml - •
on.push.tags: ["v*"]
- •
Inputs:
- •Required:
- •
<version>(for examplev0.1.0)
- •
- •Optional:
- •
--remote <name>(defaultorigin) - •
--dry-run(validate and print planned actions only)
- •
Outputs:
- •Syncs version values to the provided input version (
vX.Y.Z->X.Y.Z) for:- •explicit
version = "..."entries in trackedCargo.tomlfiles - •tracked
workflows/*/workflow.tomlmanifests (excluding_template)
- •explicit
- •Refreshes tracked
Cargo.lockworkspace package versions when present. - •Creates a version-bump commit when sync changes are needed.
- •Pushes the version-bump commit to the current upstream branch.
- •Creates an annotated git tag (
Release <version>). - •Pushes tag to remote (
git push <remote> refs/tags/<version>). - •Prints release URL when remote is GitHub-compatible.
Exit codes:
- •
0: success - •
1: operational failure (git/remote/tag push error) - •
2: usage error - •
3: precondition failure (not git repo, dirty tree, missing remote, duplicate tag)
Failure modes:
- •Invalid version format (must start with
v). - •Working tree not clean.
- •Current branch has no upstream or is behind upstream.
- •Tag already exists locally or on remote.
- •
origin(or provided remote) not configured. - •Push failed due to auth/permissions/network.
Scripts (only entrypoints)
- •
<PROJECT_ROOT>/.codex/skills/release-workflow/scripts/release-workflow.sh
Workflow
- •Validate repository state (
gitrepo, clean tree, remote exists, upstream branch ready). - •Validate version format and tag uniqueness (local + remote).
- •Sync versions (
Cargo.toml+ workflow manifests) to input semver and commit/push when needed. - •Create annotated tag
Release <version>. - •Push tag to remote.
- •Print success summary and release URL.