Create a release PR that bumps the version and updates the changelog. After the PR is merged, a GitHub workflow will automatically tag the release and bump to the next development version.
Arguments
The skill accepts a version level argument:
- •
patch- 0.1.0 -> 0.1.1 - •
minor- 0.1.0 -> 0.2.0 - •
major- 0.1.0 -> 1.0.0 - •Or an explicit version like
0.2.0
Example: /release minor
Steps
- •
Verify prerequisites:
- •Must be on
mainbranch - •Working directory must be clean
- •Must be up to date with origin/main
bashgit fetch origin if [ "$(git branch --show-current)" != "main" ]; then echo "Error: Must be on main branch" exit 1 fi if [ -n "$(git status --porcelain)" ]; then echo "Error: Working directory not clean" exit 1 fi if [ "$(git rev-parse HEAD)" != "$(git rev-parse origin/main)" ]; then echo "Error: Not up to date with origin/main" exit 1 fi
- •Must be on
- •
Run local checks:
bashcargo clippy --all-targets --all-features -- -D warnings cargo test --all
If checks fail, stop and report the errors.
- •
Determine the new version:
bash# Get current version from server/Cargo.toml CURRENT=$(grep '^version = ' server/Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') echo "Current version: $CURRENT" # Use cargo-release to calculate new version cargo release version <LEVEL> --dry-run 2>&1 | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'
- •
Create release branch:
bashNEW_VERSION="X.Y.Z" # from step 3 git checkout -b release/v${NEW_VERSION} - •
Bump versions using cargo-release:
bashcargo release version <LEVEL> --execute --no-confirm
- •
Update CHANGELOG.md:
- •Move items from "Unreleased" section to new version section
- •Add release date
- •Create new empty "Unreleased" section
The changelog should follow Keep a Changelog format. Ask the user if they want to review/edit the changelog before proceeding.
- •
Commit changes:
bashgit add -A git commit -m "release: prepare v${NEW_VERSION}" - •
Push and create PR:
bashgit push -u origin release/v${NEW_VERSION} gh pr create \ --title "release: v${NEW_VERSION}" \ --body "$(cat <<EOF ## Release v${NEW_VERSION} This PR prepares the release of v${NEW_VERSION}. ### Changes - Version bump across all crates - Changelog update ### After Merge The release workflow will automatically: 1. Create git tag \`v${NEW_VERSION}\` 2. Build and publish release artifacts 3. Bump to next development version (\`-alpha.0\`) --- See CHANGELOG.md for details. EOF )" - •
Report the PR URL to the user.
After PR Merge
When the PR is merged to main, the tag-release.yml workflow will:
- •Detect the version from Cargo.toml
- •Create and push the git tag
vX.Y.Z - •The
release.ymlworkflow then builds artifacts - •Create a commit bumping to next dev version (e.g.,
0.2.1-alpha.0)
Troubleshooting
- •cargo-release not installed:
cargo install cargo-release - •gh CLI not installed:
brew install ghor see https://cli.github.com/ - •Not authenticated with gh:
gh auth login