From 4cfcb0df516ecb9f08d415317a83d147059bb583 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Wed, 29 Jul 2026 12:22:07 +0100 Subject: [PATCH] chore: generate release notes from the merged pull requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notes came from the tagged commit, and since the workflow creates the tag itself that meant whatever landed last — the alpha release ended up carrying the previous PR's description. Generate them instead, against the last full release, so the notes list what actually changed since the version people are on. --- .github/workflows/manual-release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 31328fd..512a88f 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -86,12 +86,26 @@ jobs: git push origin "refs/tags/$tag" echo "✅ Tagged $(git rev-parse --short HEAD) as $tag" + # Notes are generated from the pull requests merged since the last full release. Reading + # them from the tag instead gives you whatever commit happened to be tagged, which since + # the tag is created here is just the previous PR's description. + notes_args="--generate-notes" + previous="$(gh api "repos/$GITHUB_REPOSITORY/releases/latest" --jq .tag_name 2>/dev/null || true)" + if [ -n "$previous" ]; then + # /releases/latest skips prereleases and drafts, so this is the last version people + # actually got, which is the useful thing to list changes against. + notes_args="$notes_args --notes-start-tag $previous" + echo "ℹ️ Generating notes for changes since $previous" + else + echo "ℹ️ No previous release found; generating notes from the full history" + fi + # Create empty draft release gh release create "$tag" \ --title "$tag" \ - --notes-from-tag \ --draft \ --verify-tag \ + $notes_args \ $prerelease_args if [ $? -ne 0 ]; then