Use trusted publishing for Cargo crates - #17426
Conversation
|
r? @epage rustbot has assigned @epage. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
With this, is manual token publishing being removed? We occasionally need to do one-off publishes and don't have CI setup for that. Granted Eric was the only one who could do that and unsure if he handed that off to anyone else. |
|
The whole idea of trusted publishing is to publish only from CI, yeah. How did the one-off publishes work? We can still make the publish process be manually triggered, e.g. by clicking on a workflow in the GitHub UI. |
No, trusted publishing is about providing a more secure way to publish from an automated system and does not convey any more trust than local, manual publishing. The name is very confusing. See also https://blog.yossarian.net/2026/07/07/You-shouldnt-trust-trusted-publishing. William Woodruff and I talked about this on Zulip when they were proposing to add it to crates.io. |
Eric handled it. The current workflow is insufficient because it is designed for releases and doesn' handle things like |
I'm aware of that discussion :) And I agree that the name is not ideal, but the point is still the same, you have to publish from CI (meaning, if we move forward with the infra plan, it just won't be possible to publish otherwise). So we should figure out how to make that work for all use-cases of t-cargo.
We can add parameters to the workflow, e.g. in the GitHub UI you can run it manually and select which crates to publish via a comma-separated list. Or we could add a script that will do the same. |
Yes, |
|
I think that's a bit orthogonal to using trusted publishing, but in general moving that crate to a separate repository sounds like a useful cleanup on its own, at least to me. |
Handed off to me (as you can see I am one of the owner).
|
|
Ah, ok. If |
|
The conclusion in #t-cargo > discontinue `home` and a new rustup-cargo-util shared repo is kinda we probably want to keep |
|
Home wasn't published by this GHA workflow anyway, right? So we just won't add it to the team repo yet, and then nothing changes for it. |
Companion to rust-lang/team#2727. This is done to improve publishing security, and allow us to track Cargo crates in the
teamdatabase.CC @Mark-Simulacrum (probably you'll want to wait until the next release? or we can test drive it tomorrow on 1.98.1 :) )