Jens-G opened a new pull request, #3588: URL: https://github.com/apache/thrift/pull/3588
## Summary Fixes the `release_rust.yml` workflow so the Rust crate is automatically published to crates.io whenever a GitHub Release is published. Also supersedes #3587. Changes: - **Remove `if: false`** gate that disabled the entire job (added in lieu of THRIFT-5917) - **Switch trigger** from `push: tags:` to `release: types: [published]` — consistent with `pypi.yml` and `release_ruby.yml`, and prevents publishing before the PMC vote passes - **Add `environment: release`** — required for OIDC trusted publishing (same as pypi/ruby) - **Set `RUSTUP_TOOLCHAIN: stable`** on cargo steps — the repo-pinned `rust-toolchain` (1.83) predates `edition2024` support required by transitive dependencies (`getrandom >= 0.4`); stable Rust is pre-installed on ubuntu-latest runners - **Fix publish condition** to `github.event_name == 'release' && !github.event.release.prerelease` — dry-run runs on every trigger, actual publish only on non-prerelease GitHub Releases - **Fix `Cargo.toml` wildcard dev-dependency** `uuid = "*"` → `uuid = "1"` — crates.io rejects wildcard version constraints (this blocked the 0.23.0 publish; fixed separately in #3587 which this supersedes) ## Prerequisites (one-time manual step — cannot be done in CI) **Trusted publishing on crates.io must be configured** before the publish step can authenticate: 1. Go to https://crates.io/crates/thrift → Settings → Trusted Publishing 2. Add a trusted publisher: - Owner: `apache` - Repository: `thrift` - Workflow: `release_rust.yml` - Environment: `release` This is the same OIDC mechanism already used for the existing workflow structure. ## Limitations The OIDC publish path cannot be end-to-end tested without merging and cutting a real release. The `--dry-run` step validates packaging; auth and upload can only be confirmed on first use. ## Test plan - [ ] Dry-run step passes on this PR (validates packaging and toolchain) - [ ] Trusted publisher registered on crates.io (prerequisite, see above) - [ ] Verify publish fires on next GitHub Release (non-prerelease) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
