con un clic
release
// Automates the full release process — analyzes changes, suggests version, updates CHANGELOG and pubspec.yaml, commits, tags, and pushes.
// Automates the full release process — analyzes changes, suggests version, updates CHANGELOG and pubspec.yaml, commits, tags, and pushes.
End-of-task pipeline — simplify review, double review, tests, single analyze+test gate, changelog/docs. Use when you've finished implementing a task and want to harden it before committing. Does NOT commit or push; the user must ask explicitly.
Code optimization for performance, memory, and readability. Use to improve existing code.
| name | release |
| description | Automates the full release process — analyzes changes, suggests version, updates CHANGELOG and pubspec.yaml, commits, tags, and pushes. |
Automates everything from changelog update to git tag push.
Prerequisites:
git status shows no changes)main)Verify the working tree is clean and we're on the right branch:
git status --porcelain
git branch --show-current
If working tree is not clean, STOP and tell the user to commit or stash changes first.
Find the last release tag and show what changed:
# Last release tag (empty if first release)
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -n "$LAST_TAG" ]; then
echo "Last release: $LAST_TAG"
echo ""
echo "=== Commits since $LAST_TAG ==="
git log "${LAST_TAG}..HEAD" --oneline
echo ""
echo "=== Stats ==="
git diff --stat "${LAST_TAG}..HEAD"
else
echo "No previous releases found. This will be the first release."
echo ""
echo "=== All commits ==="
git log --oneline -20
fi
Read CHANGELOG.md and extract the [Unreleased] section to understand what's being released.
Show the content to the user as a summary of what will be in the release notes.
If the [Unreleased] section is empty, STOP and tell the user there's nothing to release — they should update the CHANGELOG first (use /changelog-docs skill).
Read current version from pubspec.yaml:
grep '^version:' pubspec.yaml
Calculate next build number:
TAG_COUNT=$(git tag --list 'v*' | wc -l)
NEXT_BUILD=$((TAG_COUNT + 1))
echo "Next build number: +${NEXT_BUILD}"
SemVer rules (pre-1.0):
patch (0.9.0 → 0.9.1): bug fixes, small improvements, minor tweaksminor (0.9.0 → 0.10.0): new features, significant additionsmajor (0.9.0 → 1.0.0): stable release, breaking public API changesAnalyze the [Unreleased] content and suggest a version bump type with reasoning.
Ask the user using AskUserQuestion with options:
Wait for user confirmation before proceeding.
After user confirms version X.Y.Z:
CHANGELOG.md, find the line ## [Unreleased]## [X.Y.Z] - YYYY-MM-DD## [Unreleased] and the new version header stays under the version header## [Unreleased] section should be left empty (no subsection headers)Result should look like:
## [Unreleased]
## [0.9.0] - 2026-02-19
### Added
- ...
### Changed
- ...
Use the Edit tool to make the changes precisely.
Update the version: line in pubspec.yaml:
version: X.Y.Z+N
Where N is the build number calculated in Step 4.
Use the Edit tool to make the change.
Update the version in docs/index.html in two places:
<span>vOLD</span> and replace with <span>vX.Y.Z</span>"softwareVersion": "OLD" and replace with "softwareVersion": "X.Y.Z"Use the Edit tool to make both changes.
Create user-facing release notes in English from the CHANGELOG [X.Y.Z] section. These notes will be used as the annotated tag message and will appear on the GitHub Release page.
Rules:
---, then the full Russian section (NOT inline per-line translation)steam_import_service.dart, no collectionStatsProvider)## What's New, ## Improvements, ## Bug Fixes (skip empty groups)## Что нового, ## Улучшения, ## Исправления**Full Changelog**: https://github.com/hacan359/tonkatsu_box/compare/vPREV...vX.Y.ZExample transformation:
CHANGELOG (technical):
### Added
- **Steam Library import** — new `SteamApi` client (`steam_api.dart`) fetches user's owned games...
Release notes (user-facing):
## What's New
- Import your Steam game library — games are automatically matched to IGDB with playtime tracking.
---
## Что нового
- Импорт библиотеки Steam — игры автоматически привязываются к IGDB с отслеживанием времени.
Show the generated release notes to the user and ask for confirmation before proceeding.
Save the release notes text for use in Step 8.
# Stage the changed files
git add pubspec.yaml CHANGELOG.md docs/index.html
# Create commit
git commit -m "release: vX.Y.Z"
# Create annotated tag with release notes (use HEREDOC for multiline)
git tag -a "vX.Y.Z" -m "$(cat <<'EOF'
Release vX.Y.Z
<paste release notes here>
EOF
)"
# Push commit and tag
git push origin HEAD
git push origin "vX.Y.Z"
Tell the user:
vX.Y.Z pushedflutter analyze or flutter test locally — CI handles thatv* tags + 1