Use the /release command in Claude Code to automate the release process:
/release
The command auto-detects the appropriate version bump by analyzing commits since the last tag, runs tests, updates the changelog, and creates the git tag.
This project uses Semantic Versioning:
- MAJOR (x.0.0): Breaking changes to CLI commands, options, or output formats
- MINOR (0.x.0): New commands, options, or features (backwards compatible)
- PATCH (0.0.x): Bug fixes, documentation updates (backwards compatible)
| Change | Version Bump |
|---|---|
| Remove or rename a command | MAJOR |
| Change required arguments | MAJOR |
| Change JSON output structure | MAJOR |
| Add new command | MINOR |
| Add new option to existing command | MINOR |
| Add new output format | MINOR |
| Fix bug in existing command | PATCH |
| Update documentation | PATCH |
| Update dependencies (no API change) | PATCH |
For reference, or if not using Claude Code:
-
Update CHANGELOG.md
- Add new section:
## [X.Y.Z] - YYYY-MM-DD - Document all changes under appropriate headers (Added, Changed, Fixed, Removed)
- Follow Keep a Changelog format
- Add new section:
-
Commit the changelog
git add CHANGELOG.md git commit -m "Prepare release vX.Y.Z" -
Create and push the tag
git tag vX.Y.Z git push origin master --tags
-
Create GitHub release (optional)
gh release create vX.Y.Z --title "vX.Y.Z" --notes-file - <<< "See [CHANGELOG.md](CHANGELOG.md) for details."
- All tests pass (
composer test) - Code is formatted (
composer lint) - CHANGELOG.md is updated
- Version bump is appropriate for changes