ci: publish GitHub release notes from the proposal PR - #411
Merged
Merged
Conversation
The publish_release job pushed a git tag but never created a GitHub release, leaving the releases page empty for all 58 tags. Resolve the release proposal PR by its head branch and create the release from its body, editing it if it already exists. Also make the tag push idempotent so a rerun after a partial failure can repair both the tag and the notes. Ports the mechanism from dd-trace-js scripts/release/notes.js.
IlyasShabi
requested review from
nsavoire,
r1viollet and
szegedi
as code owners
September 15, 2026 09:37
Overall package sizeSelf size: 2.62 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | pprof-format | 2.3.1 | 504.33 kB | 504.33 kB | | source-map | 0.8.0 | 185.66 kB | 185.66 kB | | node-gyp-build | 4.8.4 | 13.86 kB | 13.86 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
IlyasShabi
marked this pull request as draft
September 15, 2026 09:40
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 does this PR do?:
Publishes a GitHub Release for every version cut from a
v5.xrelease branch, using the release proposal PR's body as the release notes.Two changes to the
publish_releasejob in.github/workflows/release.yml:Release notesstep. Resolves the proposal PR by its head branch (v$VERSION-proposal) and creates the release from its body — or edits the release if it already exists.Tag releaseis now idempotent. Guarded withgit ls-remote --tags, so a rerun after a partial failure can repair the tag and the notes instead of failing on "tag already exists".Motivation:
The releases page is empty. The job pushes a git tag but never creates a release, so all 58 tags render with no notes — even though every release since v1.0.0 already has a proposal PR with a written changelog. Consumers have no changelog to read, and nothing to subscribe to for release notifications.
This ports the mechanism
dd-trace-jsuses, wherescripts/release/notes.jsruns as the last step of the publish job. Kept as inline shell rather than a script sincepprof-nodejshas a single release line and needs none of the--latest/dist-tag arbitration that script does.Additional Notes:
gh pr view v5.19.0-proposalresolves frompackage.jsonalone, and still works after the branch is deleted on merge (the PR record keepsheadRefName). Verified against v5.19.0 #409, whose branch is already gone.self.github.release.push-tags.sts.yamlalready grantscontents: write, which covers release creation.dd-trace-jsmakes the samegh pr viewcall under a byte-identical policy, so the pulls read is expected to work; if it 401s on the first run, the fix is addingpull-requests: readthere.--latestis hardcoded becausev5.xis the only release line —mainis6.0.0-preand unreleased. Noted in a comment: once a second line ships, this has to be decided per branch the waydd-trace-jsdoes it.pushevents GitHub uses the workflow file from the pushed commit, so once this is cherry-picked ontov5.xby the next release proposal, that same release gets notes.How to test the change?:
Not feasible to test in CI without publishing a release, so every command in both steps was dry-run against the live repo, read-only:
gh pr view v5.19.0-proposal --json bodygh release view v5.19.0createbranchgit ls-remote --tagsguard,v5.19.0vsv5.99.0exists (skip)/absent (tag+push)--target/--title/--latest/-Foncreate+editThe notes were also rendered through GitHub's GFM API with repo context to confirm the
#NNNreferences auto-link. For v5.19.0 the release page would show:Worth noting separately: that body is a bare number list, so the rendered notes carry no titles. v5.18.0 (#394) used
[title](commit) #NNNentries and reads much better. This PR only moves the body onto the releases page — improving what proposals put in the body is a follow-up.