From 59003c8c642c8c9f0721640502f555ee52528425 Mon Sep 17 00:00:00 2001 From: Fran Tufro Date: Fri, 13 Nov 2026 10:06:54 -0300 Subject: [PATCH] Add what changed to the release PR and the GitHub release script/release writes the commits since the previous tag to .git/release-notes-vX.Y.Z.md and prints a gh pr create command that uses it as the PR body. release.yml asks GitHub to generate the release notes from the merged PRs. --- .github/workflows/release.yml | 1 + script/release | 30 +++++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a09ff1..24e5896 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,6 +118,7 @@ jobs: uses: softprops/action-gh-release@v3 with: files: artifacts/husmo-*.tar.gz + generate_release_notes: true publish-homebrew-formula: name: Publish Homebrew formula diff --git a/script/release b/script/release index 35ae960..bd8f3f9 100755 --- a/script/release +++ b/script/release @@ -179,15 +179,39 @@ Set $version in Cargo.toml, package.json, the Claude Code plugin manifest and the README sample, and refresh Cargo.lock. EOF +# The release PR body lists what changed since the previous tag. It lives +# under .git so the working tree stays clean. Task-board commits (cubil:) and +# earlier release commits are left out. +notes=.git/release-notes-v$version.md +previous=$(git describe --tags --abbrev=0 --match 'v*' "main" 2>/dev/null || true) +{ + printf '## What is in %s\n\n' "$version" + if [ -n "$previous" ]; then + log=$(git log --no-merges --format='- %s (%h)' "$previous..main" \ + | grep -v -e '^- chore: release ' -e '^- cubil: ' || true) + else + log= + fi + printf '%s\n' "${log:-- No changes since ${previous:-the first commit}.}" + if [ -n "$previous" ]; then + printf '\nFull diff: https://github.com/frantufro/husmo/compare/%s...v%s\n' "$previous" "$version" + fi +} > "$notes" + cat <