Repository navigation
fix(ci): publish the version from the release tag - #10
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
The Publish to NPM workflow ignored the release tag. Publishing release
1.5.0put1.3.37on npm, because the workflow only bumped the patch of the published version.Changes
A single "Resolve version" step now chooses the version in this order:
versioninput on a manual run.vis dropped, so both1.5.0andv1.5.0work.package.jsonif it's ahead of npm, or a patch bump from the npm version.The step fails early if the version isn't valid semver or is already on npm, so a stale or reused tag fails before tests and build run, not at
pnpm publish.The new version is written to
package.jsonfor the build. After the publish, it's committed tomainfrom a fresh checkout ofmain. The old step pushedHEAD:mainfrom the release's detached tag checkout, which fails whenmainhas moved past the tag.This also removes the broken "Set version from input" step, which wrote to
$GITHUB_OUTPUTwithout a step id.Testing
I ran the version step locally with a stubbed
pnpm viewfor these cases: a release tag, avtag, no tag (patch bump), an input version that's already published (fails), and an invalid tag (fails).Releases still publish only
resora. Publishing@resora/plugin-clear-routerstill uses a manual run.