From 69b159f18fe315ea9460f028228027149e729181 Mon Sep 17 00:00:00 2001 From: Zeyu Yang <40936154+zeyuyang42@users.noreply.github.com> Date: Fri, 16 Oct 2026 00:10:54 +0200 Subject: [PATCH] ci: a suffixed release tag falls back to the final release's notes file max-v0.3.0-rc1 looked for docs/releases/max-v0.3.0-rc1.md only, so every dry run showed the placeholder instead of the notes it is meant to rehearse. The release job now tries the tag's own file, then -v.md, then the placeholder, which names that final file. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/ci.yml | 9 ++++++++- docs/design/release-process.md | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f25a2a7..733667d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -375,13 +375,20 @@ jobs: env: GH_TOKEN: ${{ github.token }} TITLE: Zerr* for ${{ steps.guard.outputs.title }} ${{ steps.guard.outputs.version }} + HOST: ${{ steps.guard.outputs.host }} + VERSION: ${{ steps.guard.outputs.version }} run: | ls -l assets + # Notes come from the tag's own file; a suffixed tag (max-v0.3.0-rc1) falls back to + # the final release's file (max-v0.3.0.md), so a dry run shows the real notes. notes="docs/releases/${GITHUB_REF_NAME}.md" + final="docs/releases/${HOST}-v${VERSION%%-*}.md" if [ -f "$notes" ]; then notes_args=(--notes-file "$notes") + elif [ -f "$final" ]; then + notes_args=(--notes-file "$final") else - notes_args=(--notes "Draft. Write docs/releases/${GITHUB_REF_NAME}.md and paste it here before publishing.") + notes_args=(--notes "Draft. Write $final and paste it here before publishing.") fi pre=() case "$GITHUB_REF_NAME" in *-*) pre=(--prerelease) ;; esac diff --git a/docs/design/release-process.md b/docs/design/release-process.md index d84b0c1..3493653 100644 --- a/docs/design/release-process.md +++ b/docs/design/release-process.md @@ -21,7 +21,8 @@ _Maintainer steps. User-facing install instructions live in `maxmsp/README.md` a checks the tag against the host's version file, and creates a **draft** release with the zips attached and the notes pre-filled (the `release` job in `.github/workflows/ci.yml`). Read the draft on GitHub, then publish it. A tag with a suffix (`max-v0.3.0-rc1`) becomes a prerelease - draft: that is the dry run. `gh release create` refuses an existing release, so a re-run after a + draft, filled from the final release's notes file (`max-v0.3.0.md`) when it has none of its own: + that is the dry run. `gh release create` refuses an existing release, so a re-run after a failure needs `gh release delete --yes` first. 5. **Notes live in the repo and stay**: `docs/releases/.md`, written before tagging, kept afterwards as the changelog. No H1 (the release title supplies it). `## Breaking` first when