name: update-version description: Update project versions and release tag in one consistent flow (Cargo.toml, xtask, docs, and git tag).
update-version Skill
Use this skill when preparing a release version update so crate versions and git tags do not drift.
Goal
Keep release identifiers consistent across:
Cargo.toml([package].version)xtask/Cargo.toml([package].version)- docs/examples that embed a fixed release version
- git annotated tag (
vX.Y.Z)
Required Inputs
- Optional bump kind argument:
- default:
patch(when no argument is given) - explicit:
minorormajor
- default:
Required Procedure
- Baseline checks
- Ensure working tree is clean (or changes are intentionally scoped).
- Read current version from
Cargo.toml. - Decide target version by bump kind:
- no argument -> patch bump
minor-> minor bump with patch reset to0major-> major bump with minor/patch reset to0
- Confirm target tag
vX.Y.Zdoes not already exist.
- Update versioned files
- Update
/Users/jxck/develop/sptth/Cargo.tomltoversion = "X.Y.Z". - Update
/Users/jxck/develop/sptth/xtask/Cargo.tomltoversion = "X.Y.Z". - Update fixed release examples in docs (for example
README.mdVERSION=vX.Y.Z). - Do not edit
Cargo.lockmanually. - Refresh lockfile metadata via Cargo commands after manifest updates (for example
cargo check --workspace).
- Validate
- Run:
cargo run -p xtask -- fmt-checkcargo test -qcargo check --workspace
- Commit
- Commit only files changed for version update.
- Follow
docs/commit-message.md. - Keep commit message in English.
- Tag
- Create annotated tag
vX.Y.Zon the update-version commit. - Verify tag points to expected commit.
- Push (if requested)
- Push branch and tag:
git push origin maingit push origin vX.Y.Z
Command Examples
# bump examples
# /update-version -> patch bump (default)
# /update-version minor -> minor bump
# /update-version major -> major bump
# example computed target: 0.0.4
git tag --list "v0.0.4"
cargo run -p xtask -- fmt-check
cargo test -q
cargo check --workspace
git tag -a v0.0.4 -m "v0.0.4"
git show --no-patch --oneline v0.0.4
Output Format
Provide:
- Updated files
- Validation results (
fmt-check/test/check) - Commit hash
- Tag name and tagged commit
- Push status (done or pending)
Guardrails
- Never retag an existing version; bump instead.
- Do not include unrelated refactors in the update-version commit.
- If docs mention a fixed version string, keep it aligned with the new tag.