Skip to content

Generate release notes from the published commit - #1187

Open
dwcullop wants to merge 1 commit into
mainfrom
u/dacullop/main/release-notes-commit-ref
Open

dwcullop wants to merge 1 commit into
mainfrom
u/dacullop/main/release-notes-commit-ref

Conversation

@dwcullop

Copy link
Copy Markdown
Member

Problem

The release workflow invoked git-release-notes without a head ref, so it resolved the head itself instead of being pinned to the commit actually being published. On a release run this can produce release notes for a different commit than the one packaged and tagged.

Change

  • Pass --head-ref "$env:GITHUB_SHA" to git-release-notes in .github/workflows/release.yml so the notes are always generated from the exact commit being published.
  • Add .github/scripts/Test-ReleaseNotesInvocation.ps1, which validates the git-release-notes command contract (that the workflow invocation supplies the expected arguments) so a future edit that drops --head-ref fails fast.
  • Wire that verification step into both .github/workflows/release.yml and .github/workflows/ci-build.yml, extending the existing workflow command-contract validation already performed in CI.

Fixes #1180

This branch has not been deployed

No deployments
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.

[Bug]: Release notes are generated from the default branch instead of the published commit

1 participant