Repository navigation
ci: create the GitHub release from a changelog the tests require - #1
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include
|
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.
25 tags and no releases, so nothing announced what any version changed.
The release comes from the changelog, and a test requires it
publish.ymlgains agithub-releasejob that reads the tag's section out ofCHANGELOG.mdand creates the release with it.What makes it more than a convenience is
test/changelog.test.ts: it reads the version out ofpackage.jsonand fails whenCHANGELOG.mdhas no section for it. Sincebun testalready runs in the publishing job beforenpm publish, a version bump with no entry fails the run before anything is published.The job runs after
publish, never before, because a release announcing a version that failed to publish points at nothing installable. It is a separate job so the publishing job keepscontents: read, and it sits outside thenpmenvironment, which exists only to gate the trusted publisher. It is idempotent: re-running the workflow after a flake edits the release instead of failing on one that exists.The changelog starts at 1.4.0
1.4.0 gets a real entry, server instructions and the idempotent hints. The 24 releases before it have none, and the file says so and points at the commit history rather than carrying 24 entries reconstructed from commit subjects.
This means a tag for a version with no entry fails the release. That is the intent: write the entry.
Verified
bun run lint,bun run typecheck,bun testandbun run buildall clean, 19 tests. The extractor returns 1.4.0's section and exits 1 on 1.3.9, which has no entry, and the captured output carries nobun runbanner, so the release body is the changelog text and nothing else.Unlike PyPI, npm has no changelog field to point at, so there is no packaging change here. The repository link already on the package page is what reaches these releases.