Repository navigation
fix(release): check the version on main, not the one changesets/action just made - #208
Merged
Merged
Conversation
…n just made With pending changesets, changesets/action switches the checkout to changeset-release/main and versions the package there, so the npm check after it read the next version (0.10.1) from package.json and failed: every push to main since #173 went red with "signoff-ui@0.10.1 ... was never published". The release job now reads the version before changesets/action runs and passes it to check-published.mjs as VERSION, as onsystem's release workflow does.
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 Release workflow has failed on every push to main with pending changesets since the check came in with #152 (Oct 16), for example run 38850596741 (named 0.8.1 while main had 0.8.0) and, most recently, the merge of #207:
0.10.1 is not the version on main (main has 0.10.0, which npm has). With pending changesets,
changesets/actionswitches the checkout tochangeset-release/mainand versions the package there, so the "The version on main is on npm" step after it read the version pull request's 0.10.1 frompackage.json. The check could only pass on a push with no version bump pending.What changed:
changesets/action(id: main) and passes it asVERSIONto bothcheck-published.mjssteps, as onsystem's release workflow does.check-published.mjsusesVERSIONwhen it is set, andpackages/signoff-ui/package.json's version otherwise (the dry run, and local runs, are unchanged).Tests:
check-published.test.tschecks the versionVERSIONnames over a bumpedpackage.json, both when npm has it and when it doesn't (the error names main's version), andrelease-workflow.test.tschecks the step runs beforechangesets/actionand feeds both checks. Both new tests fail on main and pass here. format:check, lint, build:lib and typecheck pass. No changeset: CI and scripts only.