Skip to content

Commit 98bfa98

Browse files
committed
Auto merge of #12344 - ehuss:contrib-publish-more, r=epage
contrib docs: Add some more detail about how publishing works This adds a little clarification on how cargo releases are made, and how things get published.
2 parents 445838d + f95a2a5 commit 98bfa98

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

publish.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/usr/bin/env python3
22

33
# This script is used to publish Cargo to crates.io.
4+
#
5+
# This is run automatically every 6 weeks by the Release team's automation
6+
# whose source is at https://github.com/rust-lang/simpleinfra/.
7+
#
8+
# See https://doc.crates.io/contrib/process/release.html for more about
9+
# Cargo's release process.
410

511
import os
612
import re

src/doc/contrib/src/process/release.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,38 @@ module].
127127

128128
## crates.io publishing
129129

130-
Cargo's library is published to [crates.io] as part of the stable release
131-
process. This is handled by the [Release team] as part of their process. There
132-
is a [`publish.py` script] that in theory should help with this process. The
133-
test and build tool crates aren't published.
134-
130+
Cargo's library and its related dependencies (like `cargo-util`) are published
131+
to [crates.io] as part of the 6-week stable release process by the [Release
132+
team]. There is a [`publish.py` script] that is used by the Release team's
133+
automation scripts (see <https://github.com/rust-lang/simpleinfra/>) to handle
134+
determining which packages to publish. The test and build tool crates aren't
135+
published. This runs on the specific git commit associated with the cargo
136+
submodule in the `stable` branch in `rust-lang/rust` at the time of release.
137+
138+
On very rare cases, the Cargo team may decide to manually publish a new
139+
release to [crates.io]. For example, this may be necessary if there is a
140+
problem with the current version that only affects API users, and does not
141+
affect the `cargo` binary shipped in the stable release. In this situation,
142+
PRs should be merged to the associated stable release branch in the cargo repo
143+
(like `rust-1.70.0`) that fix the issue and bump the patch version of the
144+
affected package. Then someone with permissions (currently a subset of the
145+
Cargo team, or the Release team) should publish it manually using `cargo
146+
publish`.
147+
148+
Some packages are not published automatically because they are not part of the
149+
Rust release train. These currently include all of the [`credential`] packages
150+
and the [`home`] package. These are published manually on an as-needed or
151+
as-requested basis by whoever has permissions (currently [@ehuss] or the
152+
Release/Infra team).
153+
154+
In the future, these manual publishing options should be integrated with
155+
GitHub Actions so that any team member can trigger them. Likely that should
156+
involve getting Infra to create scoped tokens that can be added as GitHub
157+
Secrets, and setting up GitHub Actions workflows with the appropriate
158+
permissions which can be manually triggered to launch a release.
159+
160+
[`home`]: https://github.com/rust-lang/cargo/tree/master/crates/home
161+
[`credential`]: https://github.com/rust-lang/cargo/tree/master/credential
135162
[`publish.py` script]: https://github.com/rust-lang/cargo/blob/master/publish.py
136163

137164
## Beta backports

0 commit comments

Comments
 (0)