Repository navigation
ci: release automatically when the package.json version changes on main - #461
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #461 +/- ##
=======================================
Coverage 98.46% 98.46%
=======================================
Files 52 52
Lines 3057 3057
Branches 327 327
=======================================
Hits 3010 3010
Misses 46 46
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gjbkz
commented
Oct 11, 2026
gjbkz
left a comment
Member
Author
There was a problem hiding this comment.
Reviewed 8c48975. No blocking issues.
.github/workflows/release.ymlmatches the agreed design byte for byte. It keeps Node 26.x andnpm stage publish --provenance.PublishJsrruns only when theReleasejob published, throughneeds.Release.outputs.released.- The file name stays
release.ymland there is noenvironment, matching the Trusted Publisher registration. - Merging this PR does not trigger a release: the PR doesn't touch
package.json, andv4.0.2already exists. - No
docs/tasks/files. All CI checks are green.
Known limitation, not blocking: if npm stage publish succeeds but gh release create fails, a re-run tries to stage the same version again, and PublishJsr is skipped because that job failed. Create the Release and run npx jsr publish by hand in that case.
Generated by Claude Code
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.
Changes
Automate releases when the version in
package.jsonchanges onmainand its corresponding tag does not exist. The workflow starts on pushes tomainthat changepackage.json, or throughworkflow_dispatch. If thev<version>tag already exists, subsequent release steps are skipped.When the tag is missing, the workflow builds the package and skips npm submission if the same version is already published. Otherwise, it submits the package using
npm stage publish, which requires a maintainer's approval on npmjs.com. The GitHub Release is created before that approval, so its creation and the package becoming available on npm occur at different times.After the
Releasejob succeeds,PublishJsrruns unless an existing tag caused the release to be skipped. The workflow implements the supplied YAML exactly, including these job conditions. Release notes are extracted from the matching## v<version>section ofCHANGELOG.md.The workflow filename remains
release.yml, with noenvironmentconfigured. Node 26.x, npm 11.21.0, Trusted Publishing, and--provenanceare preserved.Validation
npx --yes @action-validator/cli .github/workflows/release.ymlpassed, with only a warning that glob validation forpathsis not supported..github/workflows/release.yml.