Build the release notes from the changelog - #50
Merged
Conversation
The five existing releases were written by hand, which is a second copy of what CHANGELOG.md already owns and the two drift apart the first time one is edited without the other. The workflow now extracts the section for the tag and creates the release from it, and fails when that section is empty, because a tag whose version the changelog does not mention is a mistake worth stopping for rather than a release with a blank body. Relative links are left alone on purpose: GitHub resolves them against the tag, so a link to STABILITY.md from the v1.2.0 notes points at STABILITY.md as it was in v1.2.0, not at whatever main says a year later. Creating a release needs contents: write, so the workflow's read permission moves up. It was only ever reading to build and publish.
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.
Kdrant's five releases were written by hand. Kmemo's workflow extracts them from
CHANGELOG.md, whichis the better arrangement: a release note composed separately is a second copy of what the changelog
owns, and the two drift the first time one is edited without the other. This ports that step over, so
the two repositories release the same way.
awkand creates the release from it.mistake worth stopping for, not a release with a blank body.
[STABILITY.md](STABILITY.md)in thev1.2.0notes points atblob/v1.2.0/STABILITY.md— the released revision, not whatevermainsays later. Verified againstKmemo's rendered
v1.1.0page.contents: read→contents: write, which creating a release requires.Dry-run against the current
CHANGELOG.md:1.2.0→ 7 817 bytes,1.1.0→ 1 048,0.1.0→ 1 546,and a version that does not exist → 0 bytes, which is the case that now fails the job.
The five existing releases have already been rewritten by hand from their changelog sections, so the
back catalogue and everything from
1.3.0onward will read the same.