Skip to content

Commit 683fb2f

Browse files
chore(release): have /release publish the GitHub release after push
Previously /release stopped at 'git push && git push origin vX.Y.Z' and left creating the GitHub release as a manual follow-up that was easy to forget. Extend step 6 so that after the user confirms the tag is pushed, the command extracts the new CHANGELOG section and runs gh release create vX.Y.Z --notes=... to publish a curated release. --generate-notes is avoided on purpose: the changelog entries we just wrote are better than the raw commit titles gh would otherwise dump in.
1 parent f24d94b commit 683fb2f

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

.claude/commands/release.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,29 @@ Once the user confirms the version and changelog entries:
6666
- Commit with message: `Release vX.Y.Z`
6767
- Create an annotated tag: `git tag -a vX.Y.Z -m "Release vX.Y.Z"`
6868

69-
### 6. Finish
69+
### 6. Finish and publish the GitHub release
7070

71-
Tell the user the release is ready and show the exact command to push:
71+
1. Tell the user the local release is ready and show the exact command to push:
7272

73-
```
74-
git push && git push origin vX.Y.Z
75-
```
73+
```
74+
git push && git push origin vX.Y.Z
75+
```
76+
77+
Remind them that:
78+
- Pushing the commit (`git push`) triggers CI: tests only.
79+
- Pushing the tag (`git push origin vX.Y.Z`) triggers CI: tests → build → publish Docker image tagged `X.Y.Z` and `X.Y` → deploy to Fly.io.
80+
- To redeploy an existing version without a new release, use the `workflow_dispatch` trigger in GitHub Actions with the version number (e.g. `1.2.3`).
81+
82+
2. **Wait for the user to confirm they've pushed the tag.** Do not run `gh release create` before the tag exists on the remote — the command fails with "tag not found."
83+
84+
3. Once confirmed, extract the `## [X.Y.Z]` section from `CHANGELOG.md` (everything from the `## [X.Y.Z] - YYYY-MM-DD` heading up to — but not including — the next `## [` heading). This is the curated release body.
85+
86+
4. Create the GitHub release, passing the extracted section via `--notes`:
87+
88+
```
89+
gh release create vX.Y.Z --title "vX.Y.Z" --notes "<extracted section>"
90+
```
91+
92+
Do not use `--generate-notes`. The auto-generated notes are a list of raw commit titles, which is noisier and less useful than the curated changelog entries we just wrote in step 3.
7693
77-
Remind them that:
78-
- Pushing the commit (`git push`) triggers CI: tests only.
79-
- Pushing the tag (`git push origin vX.Y.Z`) triggers CI: tests → build → publish Docker image tagged `X.Y.Z` and `X.Y` → deploy to Fly.io.
80-
- To redeploy an existing version without a new release, use the `workflow_dispatch` trigger in GitHub Actions with the version number (e.g. `1.2.3`).
94+
5. Report the release URL that `gh release create` prints, and remind the user that the Docker image and Fly deploy are still in progress in CI.

0 commit comments

Comments
 (0)