ci(release): publish the reviewed release notes instead of the PR body

Release Please fills the draft from its PR body and GoReleaser kept that
body by default, so the draft ignored the reviewed CHANGELOG entry. Replace
it during the draft build.

The published body is the maintainer's specs/RELEASE_NOTES file, applied
to the draft before Publish Release, which keeps it. Document that step and
that Publish Release now also deploys the website.

Validation: goreleaser check (valid; only the known brews deprecation) and
ai-context check.
This commit is contained in:
Willie
2026-10-02 02:35:26 +08:00
parent 4ff5316789
commit ba4eedd9f3
3 changed files with 14 additions and 4 deletions
+2
View File
@@ -44,6 +44,8 @@ changelog:
release:
draft: true
use_existing_draft: true
# Release Please fills the draft from its PR body; replace it with the reviewed CHANGELOG entry.
mode: replace
replace_existing_artifacts: true
extra_files:
- glob: skillshare-ui-dist.tar.gz
+11 -3
View File
@@ -60,15 +60,23 @@ After the Release PR merges, the Release Please workflow tests its merge SHA, cr
Review the draft notes, migration guidance, tag and artifacts. A failed packaging job leaves an unpublished draft. Rerun the failed packaging job or, with authorization, dispatch Build Release Draft for that existing tag; do not create a second tag or change the version to hide a build failure.
### 4. Optional local notes and announcements
### 4. Release notes and announcements
If the maintainer requests detailed local notes, follow the most recent `specs/RELEASE_NOTES_*.md` and write `specs/RELEASE_NOTES_<version>.md`. The ignored `specs/` files stay local unless the user explicitly asks to commit them. Do not force-add them by default.
The published GitHub release body is `specs/RELEASE_NOTES_<version>.md`, not the CHANGELOG entry. Follow the most recent `specs/RELEASE_NOTES_*.md` (TL;DR, then one section per area) and verify every claim against source. The ignored `specs/` files stay local unless the user explicitly asks to commit them. Do not force-add them by default.
After the draft is built, replace its body with the notes. The draft is unpublished, so this needs no publication authorization; Publish Release keeps the body:
```bash
gh release edit vX.Y.Z --notes-file specs/RELEASE_NOTES_X.Y.Z.md
```
Rebuilding the draft (Build Release Draft) regenerates the body from the CHANGELOG entry, so apply the notes again after any rebuild. If the draft listed external contributors, keep that section.
Draft announcements only when requested. Describe user-visible behavior, add examples and migration guidance, and avoid internal implementation details.
### 5. Publish only when authorized
Present the concrete draft and verification results. If publication is explicitly authorized, dispatch **Publish Release** with the exact `vX.Y.Z` tag. It verifies downloaded assets and the packaged CLI before publishing, then updates Homebrew and explicitly runs Docker Publish for the pinned tag commit.
Present the concrete draft and verification results. If publication is explicitly authorized, dispatch **Publish Release** with the exact `vX.Y.Z` tag. It verifies downloaded assets and the packaged CLI before publishing, then updates Homebrew and explicitly runs Docker Publish and Website Pages for the pinned tag commit. The website deploys only here, never on pushes to `main`.
Use this workflow rather than publishing directly from the GitHub draft page, so the complete distribution path runs. For a partial distribution failure, rerun the failed job with the same tag; never retag or publish an older version over the current one.
+1 -1
View File
@@ -48,7 +48,7 @@ Before starting:
Then:
1. Generate and review the changelog.
2. For maintainer-only release notes, follow the newest `specs/RELEASE_NOTES_*.md` and write user-facing prose to `specs/RELEASE_NOTES_<version>.md`.
2. Write the GitHub release body to `specs/RELEASE_NOTES_<version>.md`, following the newest one. After the draft is built, apply it with `gh release edit vX.Y.Z --notes-file specs/RELEASE_NOTES_<version>.md`; Publish Release keeps it, but rebuilding the draft regenerates the body from `CHANGELOG.md`.
3. Review the manifest's proposed version and synchronize the Release PR files; do not perform a separate manual version bump.
4. Commit review edits or merge the Release PR only when explicitly requested. Stage only task-owned files. The automation owns release tagging after verification.
5. Draft concise GitHub release notes and a social announcement.