fix(ci): wire trusted publishing token into cargo publish#409
fix(ci): wire trusted publishing token into cargo publish#409
Conversation
📊 TypeScript Coverage ReportCoverage: 33.9% View detailed reportCoverage artifacts have been uploaded to this workflow run. |
Greptile SummaryThis PR fixes a broken Confidence Score: 5/5Safe to merge — the change is minimal, correct, and follows crates.io trusted publishing documentation exactly. All findings are P2. The fix directly matches the official crates.io trusted publishing example. Conditional logic, token scoping, and permissions are all correct. No files require special attention beyond the optional SHA-pinning suggestion on line 96. Important Files Changed
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions Runner
participant OIDC as GitHub OIDC Provider
participant CI as crates.io Auth API
participant CR as crates.io Registry
GHA->>OIDC: Request OIDC token (id-token: write)
OIDC-->>GHA: JWT token
GHA->>CI: Exchange JWT (crates-io-auth-action@v1)
CI-->>GHA: Temporary CARGO_REGISTRY_TOKEN
GHA->>CR: cargo publish kora-lib (CARGO_REGISTRY_TOKEN)
CR-->>GHA: Published ✅
GHA->>GHA: sleep 30s (index propagation)
GHA->>CR: cargo publish kora-cli (CARGO_REGISTRY_TOKEN)
CR-->>GHA: Published ✅
GHA->>CI: Revoke token (post step)
Reviews (1): Last reviewed commit: "fix(ci): wire trusted publishing token i..." | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Summary
rust-lang/crates-io-auth-action@v1CARGO_REGISTRY_TOKENto both Rust publish stepsWhy
no token foundduringcargo publishTest Plan
Publish Rust Cratesfrommainafter merge