Repository navigation
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. |
|
FYK : I removed |
Update cargo submodule 11 commits in f3865b2a4d1acc5276f6b3c67d0e057f4dab3928..45c3aacf0e8dabdcdb6b7b518db100061d6367a7 2026-09-29 19:58:08 +0000 to 2026-10-06 16:29:08 +0000 - feat(pkgid-spec): Builtin package spec parsing and formatting (rust-lang/cargo#17539) - feat(hints): support minimum optimization levels (rust-lang/cargo#17368) - Use trusted publishing for Cargo crates (rust-lang/cargo#17426) - feat(trim-paths): stabilize `profile.trim-paths` (rust-lang/cargo#17488) - fix(pkgid): avoid panic on malformed protocol URLs (rust-lang/cargo#17548) - fix(git)!: Default to net.git-fetch-with-cli if git is present (rust-lang/cargo#17329) - Improved testsuite file permissions cleanup (rust-lang/cargo#17547) - docs(guide): Give an example of checking for stale lockfile (rust-lang/cargo#17546) - Add new peak memory table to cargo timings enabled via `-Zmem-stats` (rust-lang/cargo#17531) - docs(changlog): Update 1.100.0 to reflect a beta backport (rust-lang/cargo#17542) - feat(lint): Making the lint name a terminal hyperlink to docs (rust-lang/cargo#17538)
Update cargo submodule 11 commits in f3865b2a4d1acc5276f6b3c67d0e057f4dab3928..45c3aacf0e8dabdcdb6b7b518db100061d6367a7 2026-09-29 19:58:08 +0000 to 2026-10-06 16:29:08 +0000 - feat(pkgid-spec): Builtin package spec parsing and formatting (rust-lang/cargo#17539) - feat(hints): support minimum optimization levels (rust-lang/cargo#17368) - Use trusted publishing for Cargo crates (rust-lang/cargo#17426) - feat(trim-paths): stabilize `profile.trim-paths` (rust-lang/cargo#17488) - fix(pkgid): avoid panic on malformed protocol URLs (rust-lang/cargo#17548) - fix(git)!: Default to net.git-fetch-with-cli if git is present (rust-lang/cargo#17329) - Improved testsuite file permissions cleanup (rust-lang/cargo#17547) - docs(guide): Give an example of checking for stale lockfile (rust-lang/cargo#17546) - Add new peak memory table to cargo timings enabled via `-Zmem-stats` (rust-lang/cargo#17531) - docs(changlog): Update 1.100.0 to reflect a beta backport (rust-lang/cargo#17542) - feat(lint): Making the lint name a terminal hyperlink to docs (rust-lang/cargo#17538)
Update cargo submodule 15 commits in f3865b2a4d1acc5276f6b3c67d0e057f4dab3928..29c5daa1afc262323364e039bb70c83372cc702c 2026-09-29 19:58:08 +0000 to 2026-10-07 22:13:48 +0000 - test: mark requiring ssh for tests shelling out to it (rust-lang/cargo#17563) - chore(deps): update msrv (rust-lang/cargo#17532) - fix(rustdoc): suppress edition unspecified warnings (rust-lang/cargo#17557) - chore(deps): update cargo-semver-checks to v0.51.0 (rust-lang/cargo#17553) - feat(pkgid-spec): Builtin package spec parsing and formatting (rust-lang/cargo#17539) - feat(hints): support minimum optimization levels (rust-lang/cargo#17368) - Use trusted publishing for Cargo crates (rust-lang/cargo#17426) - feat(trim-paths): stabilize `profile.trim-paths` (rust-lang/cargo#17488) - fix(pkgid): avoid panic on malformed protocol URLs (rust-lang/cargo#17548) - fix(git)!: Default to net.git-fetch-with-cli if git is present (rust-lang/cargo#17329) - Improved testsuite file permissions cleanup (rust-lang/cargo#17547) - docs(guide): Give an example of checking for stale lockfile (rust-lang/cargo#17546) - Add new peak memory table to cargo timings enabled via `-Zmem-stats` (rust-lang/cargo#17531) - docs(changlog): Update 1.100.0 to reflect a beta backport (rust-lang/cargo#17542) - feat(lint): Making the lint name a terminal hyperlink to docs (rust-lang/cargo#17538)
Update cargo submodule 15 commits in f3865b2a4d1acc5276f6b3c67d0e057f4dab3928..29c5daa1afc262323364e039bb70c83372cc702c 2026-09-29 19:58:08 +0000 to 2026-10-07 22:13:48 +0000 - test: mark requiring ssh for tests shelling out to it (rust-lang/cargo#17563) - chore(deps): update msrv (rust-lang/cargo#17532) - fix(rustdoc): suppress edition unspecified warnings (rust-lang/cargo#17557) - chore(deps): update cargo-semver-checks to v0.51.0 (rust-lang/cargo#17553) - feat(pkgid-spec): Builtin package spec parsing and formatting (rust-lang/cargo#17539) - feat(hints): support minimum optimization levels (rust-lang/cargo#17368) - Use trusted publishing for Cargo crates (rust-lang/cargo#17426) - feat(trim-paths): stabilize `profile.trim-paths` (rust-lang/cargo#17488) - fix(pkgid): avoid panic on malformed protocol URLs (rust-lang/cargo#17548) - fix(git)!: Default to net.git-fetch-with-cli if git is present (rust-lang/cargo#17329) - Improved testsuite file permissions cleanup (rust-lang/cargo#17547) - docs(guide): Give an example of checking for stale lockfile (rust-lang/cargo#17546) - Add new peak memory table to cargo timings enabled via `-Zmem-stats` (rust-lang/cargo#17531) - docs(changlog): Update 1.100.0 to reflect a beta backport (rust-lang/cargo#17542) - feat(lint): Making the lint name a terminal hyperlink to docs (rust-lang/cargo#17538)
Update cargo submodule 15 commits in f3865b2a4d1acc5276f6b3c67d0e057f4dab3928..29c5daa1afc262323364e039bb70c83372cc702c 2026-09-29 19:58:08 +0000 to 2026-10-07 22:13:48 +0000 - test: mark requiring ssh for tests shelling out to it (rust-lang/cargo#17563) - chore(deps): update msrv (rust-lang/cargo#17532) - fix(rustdoc): suppress edition unspecified warnings (rust-lang/cargo#17557) - chore(deps): update cargo-semver-checks to v0.51.0 (rust-lang/cargo#17553) - feat(pkgid-spec): Builtin package spec parsing and formatting (rust-lang/cargo#17539) - feat(hints): support minimum optimization levels (rust-lang/cargo#17368) - Use trusted publishing for Cargo crates (rust-lang/cargo#17426) - feat(trim-paths): stabilize `profile.trim-paths` (rust-lang/cargo#17488) - fix(pkgid): avoid panic on malformed protocol URLs (rust-lang/cargo#17548) - fix(git)!: Default to net.git-fetch-with-cli if git is present (rust-lang/cargo#17329) - Improved testsuite file permissions cleanup (rust-lang/cargo#17547) - docs(guide): Give an example of checking for stale lockfile (rust-lang/cargo#17546) - Add new peak memory table to cargo timings enabled via `-Zmem-stats` (rust-lang/cargo#17531) - docs(changlog): Update 1.100.0 to reflect a beta backport (rust-lang/cargo#17542) - feat(lint): Making the lint name a terminal hyperlink to docs (rust-lang/cargo#17538)
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 :) )
CARGO_REGISTRY_TOKENshould be removed from this repository once this PR is merged.