Skip to content

(MINOR) Generate release notes from commit messages - #6

Merged
PaulTrampert merged 1 commit into
mainfrom
commit-based-release-notes
Oct 4, 2026
Merged

PaulTrampert merged 1 commit into
mainfrom
commit-based-release-notes

Conversation

@PaulTrampert

Copy link
Copy Markdown
Owner

Summary

  • Replaces generate_release_notes: true on softprops/action-gh-release with notes built by mikepenz/release-changelog-builder-action in COMMIT mode. The notes list each commit summary since the previous tag, newest first.
  • A regex transformer turns #123 references into links to <repo>/issues/123, and GitHub redirects that URL to /pull/123 when the number is a PR. References that are already linked ([#9](...)) and cross-repo references (owner/repo#10) are left alone.
  • This avoids GitHub's generated notes, which only link a PR when its merge commit hash matches.
  • The release job now checks out the repo with full history, finds the previous tag with git describe (the same approach as check-changes), and runs the action in offlineMode so it reads commits from local git without making API calls.
  • Artifacts now download into artifacts/ so the release file globs can't pick up anything from the checkout.

Testing

I ran the action (v6.4.0) locally in a node:24 container against a test repo, using the same configuration:

  • Closes #7 and refs #8 → Closes [#7](…/issues/7) and refs [#8](…/issues/8)
  • (PATCH) Fix a thing (#12) → (PATCH) Fix a thing ([#12](…/issues/12))
  • [#9](x) and other/repo#10 were left unchanged
  • With no previous tag, it falls back to the initial commit and still succeeds.

This has not been run in a real release yet.

🤖 Generated with Claude Code

GitHub's generated release notes only link a PR when its merge commit
hash matches, which misses PRs in many cases. Build the notes from the
commit messages since the previous tag with
mikepenz/release-changelog-builder-action instead, and link any #123
reference to its PR or issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PaulTrampert
PaulTrampert merged commit d5bfa82 into main Oct 4, 2026
PaulTrampert added a commit to PaulTrampert/PTrampert.SimplePatch that referenced this pull request Oct 4, 2026
…flow (#146)

Closes #145

## Cause

Breaking changes for 2.0 are staged on `release/2.0`, but
`dotnet-library.yml` only triggered `pull_request` runs for `main`, so
#139–#142 had no CI build.

## Fix

- Add `release/**` to the `pull_request` branches. Publishing still runs
only for `main`: the `push` trigger is unchanged, and the shared
workflow publishes only when `github.ref` is `main`.
- Document the release-branch flow in `AGENTS.md`. PRs into
`release/<major>` are squash-merged. The release PR into `main` is
rebase-merged, because release notes are now built from commit subjects
(PaulTrampert/github-workflows#6), and a squash would collapse them to
one line.

A `pull_request` run uses the workflow file from the base branch, so
`release/2.0` needs this commit too. It has nothing `main` lacks, so it
can be fast-forwarded to `main` once this merges.

## Rejected alternatives

- Shipping releases by pushing `release/2.0:main` directly, with a
merge-gate check and an admin bypass. That kept commit SHAs for GitHub's
generated release notes, which notes built from commit subjects no
longer need.

## Outside this PR

Already applied through the API: rebase merging enabled for the
repository, `rebase` allowed in both `main` rulesets, and a new
`release/**` ruleset (squash only, build and PR-title checks required).

## Tests

No code changes. YAML change verified by inspection; this PR's own build
exercises the `main` trigger.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant