fix(ci): sdk-release publishes via OIDC trusted publisher - #245
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
Why
The previous SDK release attempts kept hitting npm's 2FA requirement:
The token was correct — npm's package-level publish protection requires 2FA at publish time regardless of token type. The cleanest fix is OIDC trusted publishing: GitHub Actions mints a short-lived registry token via its OIDC identity, bypassing 2FA enforcement legitimately and eliminating the need for any npm token in CI.
Trusted Publisher for
@protolabsai/sdkis now configured on npm pointing at:protoLabsAI/protoCLIsdk-release.ymlChanges
.github/workflows/sdk-release.ymlid-token: writeto the job'spermissionsblock — required for npm to read the GitHub OIDC token from the workflow context.NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}from the publish step — OIDC supersedes the static token. The secret can stay around in case we need to fall back, or get cleaned up in a follow-up.Side benefits
Validation
actionlintwould catch issues; verified locally by inspection)gh workflow run "SDK Release" --repo protoLabsAI/protoCLI --ref devto attempt publish of@protolabsai/sdk@0.3.0Out of scope
The
NPM_PUBLISH_TOKENorg secret + the stale repo-levelNPM_TOKENare now unused. Leaving them in place for one cycle so the rollback path is trivial if OIDC has unforeseen issues.