Repository navigation
fix(ci): publish when the release PR merges, not when a changeset lands - #8
Merged
Merged
Conversation
changesets/action runs `changeset version` in the working directory before it pushes the release branch, so the publish step that follows it in the same job sees a tree that is already bumped. 0.2.0 went out the moment #6 merged, while its release PR was still open - and that PR's own run then had nothing left to do. Gating on `has-changesets` puts the release back behind the merge.
|
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.
0.2.0was published the moment #6 merged, while its release PR was still open:By the time that PR was merged, its own run had nothing left to do:
changesets/actionrunschangeset versionin the working directory and pushes the result to the release branch. The publish step I added in #5 runs after it in the same job, so it reads apackage.jsonthat is already bumped. The release PR became decorative: a changeset landing onmainwas enough to ship.Gating on the action's
has-changesetsoutput restores the intended order. It readsfalseexactly when there is nothing pending — either the release PR just merged, or the commit never had a changeset — andpnpm publishskips versions that already exist, so the second case is a no-op.