Skip to content

[codex] use crates.io trusted publishing#1004

Merged
zxch3n merged 1 commit into
mainfrom
codex/use-crates-io-trusted-publishing
Jun 8, 2026
Merged

[codex] use crates.io trusted publishing#1004
zxch3n merged 1 commit into
mainfrom
codex/use-crates-io-trusted-publishing

Conversation

@zxch3n

@zxch3n zxch3n commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Switch the Rust crates publish workflow from a long-lived CARGO_REGISTRY_TOKEN secret to crates.io Trusted Publishing.
  • Add the GitHub OIDC permission and release environment required for trusted publisher matching.
  • Keep contents: write because the publish job still pushes cargo-release tags after publishing.

Why

The current workflow fails at crates.io with 403 Forbidden: authentication failed because the stored CARGO_REGISTRY_TOKEN is invalid or no longer has the required publish permissions. loro-ffi already uses rust-lang/crates-io-auth-action@v1 successfully, so this aligns loro with that approach and removes the need for a long-lived crates.io token in GitHub Secrets.

Validation

  • Parsed .github/workflows/publish-crates.yml with Ruby YAML.
  • Reviewed the staged diff; only publish-crates.yml changed.

Follow-up

Before the next Rust release, configure Trusted Publishing on crates.io for each crate this workflow publishes:

  • repository: loro-dev/loro
  • workflow: .github/workflows/publish-crates.yml
  • environment: release

@zxch3n zxch3n marked this pull request as ready for review June 8, 2026 10:04
@zxch3n zxch3n merged commit 2c80226 into main Jun 8, 2026
2 checks passed
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

WASM Size Report

  • Original size: 3029.88 KB
  • Gzipped size: 999.17 KB
  • Brotli size: 701.74 KB

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