Release Tag
Contract
Prereqs:
- Run inside this repository git work tree.
gitavailable onPATH.ghavailable onPATHand authenticated (gh auth status) for GitHub remotes.semantic-commitavailable onPATH(used for automated version-bump commit when needed).- If tracked
package*.jsonfiles are present:nodeavailable onPATH(used for JSON version sync). - Remote
originconfigured and reachable. - Release workflow listens on
v*tags:.github/workflows/release.ymlon.push.tags: ["v*"]
Inputs:
- Required:
<version>(for examplev0.1.0)
- Optional:
--remote <name>(defaultorigin)--dry-run(validate and print planned actions only)--force-tag(overwrite existing local/remote tag with same version)--poll-seconds <n>(default15)--max-wait-seconds <n>(default1800)
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) - tracked root
package.jsonandpackage-lock.jsonversion fields workflows/bangumi-search/src/info.plist.templateBANGUMI_USER_AGENTplaceholder (nils-bangumi-cli/X.Y.Z)
- explicit
- Refreshes tracked
Cargo.lockworkspace package versions when present. - Regenerates tracked root
THIRD_PARTY_LICENSES.mdwhen its inputs changed. - Creates a version-bump commit when sync changes are needed.
- Pushes the version-bump commit to the current upstream branch.
- Waits until CI workflow (
.github/workflows/ci.yml) for the release head commit issuccess(GitHub remotes). - Creates an annotated git tag (
Release <version>). - Pushes tag to remote (
git push <remote> refs/tags/<version>). - Waits until the release workflow run for the pushed tag is
success. - Waits until release page exists for the pushed tag (GitHub remotes).
- Success is reported only after both checks above pass.
Exit codes:
0: success1: operational failure (git/remote/tag push error)2: usage error3: precondition failure (not git repo, dirty tree, missing remote, duplicate tag)124: timeout while waiting for release workflow/release page
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.
- Use
--force-tagwhen re-tagging an existing release version is intentional.
- Use
origin(or provided remote) not configured.- Push failed due to auth/permissions/network.
- CI workflow run failed for the release head commit.
- Release workflow run failed for the pushed tag.
- Release page did not appear before timeout.
Scripts (only entrypoints)
<PROJECT_ROOT>/.agents/skills/nils-alfredworkflow-release-workflow/scripts/nils-alfredworkflow-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 + rootpackage*.json+ Bangumi User-Agent placeholder), refreshCargo.lockand trackedTHIRD_PARTY_LICENSES.mdas needed, then commit/push when changes exist. - Wait CI workflow (
.github/workflows/ci.yml) for the release head commit to complete withsuccess. - Create annotated tag
Release <version>. - Push tag to remote.
- Wait release workflow for the tag to complete with
success. - Wait release page to appear for the tag.
- If CI/release workflow fails, fix root cause on branch, update/push fix commit, then recreate/re-push tag and repeat until green.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.