ci: use crates.io trusted publishing#105
Conversation
📝 WalkthroughWalkthroughThis PR refactors the crate publishing pipeline from secret-based authentication to GitHub's OIDC token flow. The 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/publish-crates.yml (1)
13-24: ⚡ Quick winOIDC trusted publishing setup looks correct.
The workflow correctly uses
rust-lang/crates-io-auth-action@v1for OIDC-based authentication and wires the token toCARGO_REGISTRY_TOKEN. Theenvironment: releaseis required for trusted publishing.However, this reusable workflow depends on the caller granting
id-token: writepermission for OIDC to work. Consider adding a comment documenting this requirement.📝 Suggested documentation
on: workflow_call: + # NOTE: Caller must grant `id-token: write` permission for OIDC auth inputs: plan: required: true type: string🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/publish-crates.yml around lines 13 - 24, Add a short comment in the workflow near the environment: release or the rust-lang/crates-io-auth-action@v1 step stating that callers must grant OIDC id-token: write permission for the reusable workflow to fetch the token; mention that CARGO_REGISTRY_TOKEN is populated from steps.auth.outputs.token and that trusted publishing requires environment: release so integrators know to set permissions in their calling workflow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/publish-crates.yml:
- Around line 13-24: Add a short comment in the workflow near the environment:
release or the rust-lang/crates-io-auth-action@v1 step stating that callers must
grant OIDC id-token: write permission for the reusable workflow to fetch the
token; mention that CARGO_REGISTRY_TOKEN is populated from
steps.auth.outputs.token and that trusted publishing requires environment:
release so integrators know to set permissions in their calling workflow.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 72e25643-93a1-4e02-a61e-4618fc99505c
📒 Files selected for processing (3)
.github/workflows/publish-crates.yml.github/workflows/release.ymldist-workspace.toml
No description provided.