Source release notes from RELEASE-NOTES.md#27
Merged
Conversation
The publish workflow now carves out the "## v<tag>" section of RELEASE-NOTES.md and uses it verbatim for the GitHub release body and the nupkg's PackageReleaseNotes. No matching section → the step fails before build, so the nupkg never ships with the unfiltered PR-title list that GitHub's generate-notes API produces. CLAUDE.md flips its "RELEASE-NOTES.md isn't read by CI" guidance and adds a pre-tag checklist item.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
.github/workflows/publish.yml— the "Resolve release notes" step nowawks the section under## v<tag>inRELEASE-NOTES.mdand writes it torelease-notes.md. That same file is used twice downstream: as the GitHub release body (gh release create --notes-file) and as the nupkg'sPackageReleaseNotes(via theexport PackageReleaseNotes=...beforedotnet pack).::error::annotation pointing atRELEASE-NOTES.md. Build/test/pack never run, the tag is safe to delete + recreate at a fix commit, no half-baked nupkg ever leaves the workflow.gh api .../releases/generate-notesfallback is gone, and with it theGH_TOKENenv var on this step (no API call left).CLAUDE.mdrelease-section bullet rewritten:RELEASE-NOTES.mdis now described as the source of truth, with a pre-tag checklist item ("verify## v<next-version>is up to date covering everything merged since the previous tag").Testing
export GITHUB_REF_NAME=v0.1.0 && awk -v ver="$GITHUB_REF_NAME" '$0 ~ "^## " ver "([[:space:]]|$)" {in_section=1;next} in_section && /^## / {exit} in_section {print}' RELEASE-NOTES.mdshould print the
## v0.1.0body.GITHUB_REF_NAME=v9.9.9should produce empty output (zero non-whitespace chars).v0.1.0(the planned first release), the workflow run should reportUsing curated '## v0.1.0' section from RELEASE-NOTES.md.and the resulting GitHub release body should matchRELEASE-NOTES.md's## v0.1.0section verbatim.RELEASE-NOTES.mdheading → workflow fails at the "Resolve release notes" step with the::error::annotation, nothing downstream runs.Developer notes
PackageReleaseNotesis baked into the nupkg at pack time. The nupkg uploads to the GitHub release and is then immutable as far as the Optimizely feed is concerned — anyone pulling the package after that sees the unfiltered PR-title dump in their IDE. Fail-closed forces the curated body before any artifact escapes.## v<MAJOR.MINOR.PATCH>headings with##(or EOF) as the terminator. Matches the existingRELEASE-NOTES.mdlayout. If we ever introduce other##-level headings inside a release section (e.g.## Migration notes), they'd truncate the body — easy to spot in the workflow log's "Release notes" group and easy to fix by demoting them to###.^## v0.1.0([[:space:]]|$)):v0.1.0won't accidentally matchv0.1.0-rc1orv0.1.10. Prereleases get their own section by design.