ci(release): harden publish job — retry verify, explicit checkout token#158
Merged
Conversation
The Release workflow's publish job had two latent fragilities exposed by
recent runs:
1. "Verify published packages" used `sleep 10 && npm view`, which races
the npm registry CDN propagation window (30–90s). Caused spurious E404
failures on otherwise-successful releases (e.g. v0.36.2 #26196949274).
2. actions/checkout used the implicit default token. The sibling `release`
job sets `token: \${{ secrets.GITHUB_TOKEN }}` explicitly; matching that
here removes a known intermittent auth path that surfaced in v0.38.1
(#26340559368 — recovered by rerun).
Port the retry pattern (6 × 15s ≈ 90s cap) from publish.yml verbatim, and
add the explicit token for symmetry with the release job.
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.
Why
The Release workflow's
publishjob has had recurring failures across recent runs (5 of last 20 runs). Two distinct fragilities, both fixable in a few lines:CDN propagation race —
Verify published packagesdoessleep 10 && npm view. The npm registry CDN can take 30–90s to propagate a new version, so this races and 404s on otherwise-successful publishes. Real examples:Implicit checkout token —
actions/checkoutin the publish job relied on the default token. The siblingreleasejob sets `token: ${{ secrets.GITHUB_TOKEN }}` explicitly; matching that removes a known intermittent auth path. Real example:The retry pattern already exists in `.github/workflows/publish.yml:64-75` — this PR ports it verbatim into `release.yml` so both publish paths converge on the same hardening.
What changed
How tested
Risk & rollback
Low. CI-only change. Worst case: the retry loop masks a different propagation issue and we get a 90s wait instead of 10s before failing — strictly better than today. Revert: `git revert `.