fix(ci): publish with --skip-validation to survive the pub.dev 403 - #142
Merged
Conversation
pub.dev now answers the bucket-served version-listing and advisory reads with HTTP 403 whenever the request carries a bearer token, so the credentialed publish step dies during dependency resolution before the upload starts (dart-lang/pub-dev#9576). The `Validate package publication` step already resolves and validates the package before setup-dart provisions the token, so skipping the repeated client-side validation loses no coverage, and pub.dev still validates the archive server-side on upload. Revert once dart-lang/pub-dev#9576 is fixed.
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.
Problem
pub.dev returns
403with a Cloud StorageAccessDeniedbody forGET /api/packages/<pkg>andGET /api/packages/<pkg>/advisorieswhenever the request carries anAuthorization: Bearerheader. It worked on 2026-09-05 and was failing by 2026-09-10. Filed upstream asdart-lang/pub-dev#9576.dart-lang/setup-dartregisters the OIDC token for the wholehttps://pub.devhost, so the pub client attaches it to every request.pub publishalways resolves before uploading, and that resolution prefetches the version listing and advisories. On a fresh runner the publish step therefore fails withAuthentication error (403)before the upload starts.This already took down three release runs in
conceptadev/remix; the same fix got beta.9 out.Change
One flag on the final publish step, plus a comment pointing at the upstream issue.
Why this is safe
Validate package publication(scripts/publish_dry_run.dart) runs beforeProvision pub.dev OIDC credentials, so full client-side validation and resolution still happen, uncredentialed.Restore the reviewed package treeguarantees it.--skip-validationonly skips the repeated client-side pass. pub.dev still validates the archive server-side on upload.Verification
actionlint .github/workflows/publish-packages.yml— clean.dart test test/scripts/release_workflow_security_test.dart— 15/15 pass, includingprovisions pub.dev OIDC credentials before publishing.remixandremix_fortal1.0.0-beta.9 today.Follow-up
Revert this flag once
dart-lang/pub-dev#9576is fixed.