Repository navigation
ci(release): rewrite release notes when one package fails to publish - #901
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
@evlog/cli
evlog
@evlog/nuxthub
@evlog/signals
@evlog/telemetry
commit: |
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 2
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch was successfully deployed
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.
When one package fails to publish, the release job now still rewrites the release notes and pins Latest for the packages that did publish.
What happened in 2.33.0
Run 39043309174 (attempt 1) published
evlog@2.33.0,@evlog/cli@0.11.0and@evlog/telemetry@0.3.5, then failed on@evlog/signals@0.2.1(E404: the package had no npm Trusted Publisher yet). Because the publish step failed, every later step was skipped:So the three releases kept changesets' default
### Minor Changes/### Patch Changesbodies. The re-run published Signals and only rewrote that one release, since it only covers what it publishes. The other three were rewritten by hand afterwards.Why the fix works
The pinned
changesets/action(v1.9.0,src/index.ts) sets the outputs for the packages that did publish before it exits with the error:The failed run shows that message:
Publish command exited with code 1, but some packages were published: @evlog/cli@0.11.0, evlog@2.33.0, @evlog/telemetry@0.3.5.The two steps after it now use
!cancelled() && steps.changesets.outputs.published == 'true'instead of the implicitsuccess(). They run for whatever reached npm, and the job still fails, so the broken package stays visible.AGENTS.mdalso says that a new package needs GitHub Actions added as its Trusted Publisher on npmjs.com before its first CI release, since CI cannot check that setting ahead of time.Testing
actionlint .github/workflows/release.yml: exit 0.No changeset: CI and docs only.
ELI5: when several packages are released together and one of them fails, the others still get their tidy release page on GitHub, and
evlogstill keeps the "Latest" badge.