fix(publish): support npm trusted publishing auth#763
Conversation
Greptile SummaryThis PR adds npm Trusted Publishing support so packages can be published from CI without a long-lived
Confidence Score: 5/5The auth path change is well-guarded and safe to merge; OIDC is only attempted when explicit env signals are present and the fallback to configured The only inconsistency found is that The Important Files Changed
Reviews (4): Last reviewed commit: "fix(publish): fall back after oidc failu..." | Re-trigger Greptile |
242875d to
e03028f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e03028f. Configure here.

Summary
Root Cause
aube publish --provenancegenerated Sigstore provenance, but publish auth still required an .npmrc token. Tokenless npm Trusted Publishing workflows therefore failed before upload.Validation
cargo check -p aube -p aube-registrycargo build -p aube./test/bats/bin/bats test/publish.batsNote
Medium Risk
Changes CI publish authentication timing and failure modes; behavior is more resilient but alters when .npmrc vs OIDC is used.
Overview
Publish now resolves npm Trusted Publishing (OIDC exchange + bearer token) after the pre-pack lifecycle and tarball build, using the final
archive.namefrom the packed artifact—not the pre-hook manifest name. That fixes trusted publishing whenprepublishOnly(or similar) renames the package before upload.GitHub Actions OIDC token fetch failures (network errors, non-2xx responses, or bad JSON) no longer fail the command; they debug-log and return no OIDC token so publish falls back to configured
.npmrcauth, matching the existing exchange-failure behavior.New BATS coverage: OIDC unavailable → PUT uses
.npmrctoken;NPM_ID_TOKENexchange and PUT target the post-hook package name.Reviewed by Cursor Bugbot for commit e5126ef. Bugbot is set up for automated code reviews on this repo. Configure here.