Skip to content

fix(publish-preview-oidc): continue publishing when a package fails - #344

Merged
Mrtenz merged 2 commits into
mainfrom
mrtenz/publish-preview-continue-on-failure
Nov 19, 2026
Merged

Mrtenz merged 2 commits into
mainfrom
mrtenz/publish-preview-continue-on-failure

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

The monorepo preview publish step used yarn workspaces foreach --no-private --all exec yarn npm publish --tag preview. If one package failed to publish, foreach would not start the remaining publishes, so one broken package stopped every package after it from getting a preview build.

This PR replaces the foreach call with a loop over yarn workspaces list --no-private --json. Each package is published from its own directory in a subshell. When a publish fails, the step logs a ::warning:: annotation with the package name and continues with the next package. The output for each package is wrapped in a log group so the logs stay readable.


Note

Low Risk
CI-only change to preview publish orchestration and PR messaging; no runtime app or auth logic.

Overview
The monorepo preview publish step in publish-preview-oidc.yml no longer uses yarn workspaces foreach … yarn npm publish, which stopped the whole run on the first failure. It now loops workspaces from yarn workspaces list, publishes each package in its directory, records successes and failures under $RUNNER_TEMP, logs a warning on failure, and keeps going.

The preview build message for monorepos is built from those recorded lists instead of re-deriving every package version from the repo. The comment/summary shows only what actually published, says when nothing published, and adds a failed-packages block with a link to the workflow run when any publish failed.

Reviewed by Cursor Bugbot for commit 8ea7c77. Bugbot is set up for automated code reviews on this repo. Configure here.

`yarn workspaces foreach` stops starting new publishes after the first
failure, so one broken package blocked every package after it. Loop over
the public workspaces instead, log a warning for each failed publish, and
carry on with the rest.
@Mrtenz
Mrtenz marked this pull request as ready for review November 19, 2026 09:52

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8a6dfe2. Configure here.

The publish step now records each package as published or failed. The
"Generate preview build message" step reads those lists instead of
looking up every workspace again. Failed packages are listed with a link
to the workflow run, and the message no longer says builds were
published when none were.
@Mrtenz
Mrtenz merged commit ece0210 into main Nov 19, 2026
12 checks passed
@Mrtenz
Mrtenz deleted the mrtenz/publish-preview-continue-on-failure branch November 19, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants