with one click
with one click
| name | release |
| description | Create a new release with tag, GitHub release, and homebrew-tap update |
This skill creates a new release by:
First, get the current version from Cargo.toml and analyze changes since the last release:
# Get current version
grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/'
# Get the latest tag
git describe --tags --abbrev=0 2>/dev/null || echo "No tags found"
# Get commits since last tag (or all commits if no tag)
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
if [ -n "$LAST_TAG" ]; then
git log --oneline "$LAST_TAG"..HEAD
else
git log --oneline
fi
Determine the recommended version bump based on conventional commits:
BREAKING CHANGE or !: in message)feat: or similar)fix:, docs:, refactor:, chore:, etc.)Use the AskUserQuestion tool to ask the user which version bump to apply. Put the recommended option first based on the analysis above.
Question format:
After user confirms the version bump:
Update Cargo.toml version:
Update Cargo.lock:
cargo update -p keifu
Commit the version bump:
git add Cargo.toml Cargo.lock
git commit -m "$(cat <<'EOF'
Bump version to NEW_VERSION
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)"
Create and push the tag:
git tag vNEW_VERSION
git push origin main --tags
The release workflow is triggered by the tag push. Wait for it to complete:
# Wait for the workflow to start and complete
gh run list --workflow=release.yaml --limit=1 --json databaseId,status,conclusion
# Watch the workflow progress
gh run watch $(gh run list --workflow=release.yaml --limit=1 --json databaseId --jq '.[0].databaseId')
If the workflow fails, inform the user and stop. Do not proceed with homebrew-tap update.
After the release workflow completes successfully:
Create a temporary directory and clone homebrew-tap:
TEMP_DIR=$(mktemp -d)
git clone git@github.com:trasta298/homebrew-tap.git "$TEMP_DIR"
Download release assets and calculate SHA256:
NEW_VERSION="X.Y.Z" # The new version without 'v' prefix
TAG="vX.Y.Z" # The tag with 'v' prefix
# Get SHA256 for each platform
TARGETS=(
"aarch64-apple-darwin"
"x86_64-apple-darwin"
"aarch64-unknown-linux-gnu"
"x86_64-unknown-linux-gnu"
)
for TARGET in "${TARGETS[@]}"; do
URL="https://github.com/trasta298/keifu/releases/download/$TAG/keifu-$TAG-$TARGET.tar.gz"
SHA=$(curl -sL "$URL" | sha256sum | cut -d' ' -f1)
echo "$TARGET: $SHA"
done
Update the formula file ($TEMP_DIR/Formula/keifu.rb):
version linesha256 values with the calculated hashesCommit and push the changes:
cd "$TEMP_DIR"
git add Formula/keifu.rb
git commit -m "$(cat <<'EOF'
Update keifu to NEW_VERSION
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)"
git push origin main
Clean up the temporary directory:
rm -rf "$TEMP_DIR"
Inform the user that the release is complete with: