| name | release |
|---|---|
| description | Update changelog, bump version, tag, and push a release for the specified version number. |
| argument-hint | <version e.g. 1.2.0> |
| allowed-tools | Bash, Read, Glob |
Create release version $ARGUMENTS.
Follow these steps in order. Stop and report if any step fails.
- Confirm the version
$ARGUMENTSfollows semantic versioning (X.Y.Z or X.Y.Z-prerelease). - Run
git tagand confirm this tag does not already exist. - Confirm the working tree is clean (
git status). If not, stop. - Confirm you are on the main (or release) branch.
- Look for a
CHANGELOG.md,HISTORY.md, orCHANGES.mdfile. - Find the
## Unreleasedsection (or equivalent). - Rename it to
## [$ARGUMENTS] - YYYY-MM-DD(use today's date). - Add a new empty
## Unreleasedsection at the top. - If no changelog file exists, create
CHANGELOG.mdwith the standard Keep a Changelog format and add an entry for this version.
Find the version string in the project's manifest file and update it to $ARGUMENTS:
package.json:"version"field.pyproject.toml:version =under[project]or[tool.poetry].setup.py/setup.cfg:version=field.Cargo.toml:version =field.version.rb,version.go,__version__.py, or similar version files.
Update all locations where the old version appears (not just one).
Run the full test suite. If any tests fail, stop and report.
Stage only the version and changelog files. Commit with the message:
chore(release): $ARGUMENTS
Create an annotated tag: git tag -a v$ARGUMENTS -m "Release $ARGUMENTS"
Push the commit and tag: git push && git push --tags
Run gh release create v$ARGUMENTS --generate-notes --title "v$ARGUMENTS".
Print the release URL when done.