Skip to content

ci: mint crates.io token via OIDC auth action before publish#1

Merged
YoungDan merged 1 commit into
mainfrom
ci/crates-oidc-auth
May 29, 2026
Merged

ci: mint crates.io token via OIDC auth action before publish#1
YoungDan merged 1 commit into
mainfrom
ci/crates-oidc-auth

Conversation

@YoungDan
Copy link
Copy Markdown
Member

Summary

  • cargo publish does not perform the crates.io Trusted Publishing OIDC exchange itself.
  • Add rust-lang/crates-io-auth-action (SHA-pinned v1.0.4) ahead of publish to mint a short-lived CARGO_REGISTRY_TOKEN, consumed via env by cargo publish.
  • Update the prerequisites comment accordingly.

Why a PR

Direct pushes to main are now blocked by the ruleset (3 required Test checks). This change goes through CI like everything else.

Test plan

  • CI green: Test (ubuntu-latest), Test (macos-latest), Test (windows-latest)
  • On next release publish, the publish job authenticates via OIDC and cargo publish succeeds

cargo publish does not perform the Trusted Publishing OIDC exchange itself;
add rust-lang/crates-io-auth-action (SHA-pinned v1.0.4) to mint a short-lived
CARGO_REGISTRY_TOKEN consumed by cargo publish.
@YoungDan YoungDan merged commit 9d6800d into main May 29, 2026
4 checks passed
@YoungDan YoungDan deleted the ci/crates-oidc-auth branch May 29, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant