Repository navigation
Generate GitHub release notes at build time - #966
Open
julianhille wants to merge 2 commits into
Open
julianhille wants to merge 2 commits into
julianhille wants to merge 2 commits into
Conversation
Both release jobs created the GitHub release with no body. A new .github/scripts/release-notes.mjs builds it from the changelog section of the released version, the pull requests merged since the previous tag with the same prefix and the issues they close, the contributors, the first-time contributors, and a compare link. Relative changelog links are rewritten to the repository at the tag so they resolve on the release page. The release jobs run it right after the version check, so a tag whose version has no changelog section fails before anything is published, and pass the result as body_path to the existing release step. The script has no dependencies and is covered by node --test, run by the linting workflow.
Documentation build overview
4 files changed± development.html± api/type-declarations.html± recipe/encryption.html± recipe/reference.html |
Documentation build overview
|
Owner
Author
|
@copilot resolve the merge conflicts in this pull request |
…notes # Conflicts: # CHANGELOG.md # packages/wasm/CHANGELOG.md Co-authored-by: julianhille <741067+julianhille@users.noreply.github.com>
Contributor
Merged |
This branch has not been deployed
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.
Both release jobs created the GitHub release with
softprops/action-gh-releaseand no body, so a release page showed only the tag and its files.What changes
.github/scripts/release-notes.mjsbuilds the release body from:## [<version>]section of the package changelog (CHANGELOG.mdfornative-v*,packages/wasm/CHANGELOG.mdforwasm-v*), with relative links rewritten toblob/<tag>/URLs so they resolve on the release page;body_pathto the existing release step. The jobs gainpull-requests: read.npm run test:release-notesruns the script'snode --testsuite (22 tests over a fake API) and is part of the linting workflow.Verified
Run locally against the real
native-v7.1.0andwasm-v1.1.0tags; both produce the expected sections with 28 pull requests and their closed issues. The missing-section case exits with code 1 and a clear message.Closes #962