with one click
release
// Create a GitHub release with changelog. Use when asked to "release", "cut a release", "publish version", "bump version", "create release".
// Create a GitHub release with changelog. Use when asked to "release", "cut a release", "publish version", "bump version", "create release".
| name | release |
| description | Create a GitHub release with changelog. Use when asked to "release", "cut a release", "publish version", "bump version", "create release". |
Create a versioned GitHub release with an auto-generated changelog from commits since the last release.
Check the current version and latest git tag:
cat package.json | grep '"version"'
git tag -l --sort=-v:refname | head -5
If the user provided a version, use it. Otherwise ask:
What version? (current is X.Y.Z โ patch/minor/major, or exact version)
Resolve semver:
patch โ X.Y.(Z+1)minor โ X.(Y+1).0major โ (X+1).0.0Get commits since the last tag (or all commits if no tags exist):
# If tags exist:
git log $(git tag -l --sort=-v:refname | head -1)..HEAD --pretty=format:"- %s" --no-merges
# If no tags:
git log --pretty=format:"- %s" --no-merges
Group commits by type using conventional commit prefixes:
| Prefix | Section |
|---|---|
feat | โจ Features |
fix | ๐ Bug Fixes |
refactor | โป๏ธ Refactoring |
docs | ๐ Documentation |
chore, test, perf, ci | ๐ง Other Changes |
| No prefix | ๐ง Other Changes |
Format as markdown. Omit empty sections. Strip the type(scope): prefix from each line for readability.
Always start the changelog with this install block (hardcoded):
Install:
```bash
pi install git:github.com/HazAT/pi-laravel-boost@v<VERSION>
```
Or latest:
```bash
pi install git:github.com/HazAT/pi-laravel-boost
```
Then add the grouped commit sections below it.
Example output:
## โจ Features
- Add live subagent status widget
- Make subagent tool async โ return immediately, steer on completion
## ๐ Bug Fixes
- Fix session file collision with 3+ concurrent agents
- Truncate widget lines to terminal width
Bump the version in package.json:
# Read, update, write back โ don't use npm version (it may auto-commit)
Use a precise edit to change only the version field.
git add package.json
git commit -m "chore(release): v<VERSION>"
git tag v<VERSION>
git push && git push --tags
gh release create v<VERSION> --title "v<VERSION>" --notes "<CHANGELOG>"
Pass the generated changelog as the --notes value. Use a temp file if the changelog is long:
echo "<CHANGELOG>" > /tmp/release-notes.md
gh release create v<VERSION> --title "v<VERSION>" --notes-file /tmp/release-notes.md
rm /tmp/release-notes.md
Confirm the release was created:
gh release view v<VERSION>
Print a summary:
โ
Released v<VERSION>
Tag: v<VERSION>
URL: https://github.com/<owner>/<repo>/releases/tag/v<VERSION>