Skip to content

Commit 3c8399e

Browse files
committed
contrib docs: Add some more detail about how publishing works
1 parent 04c94d9 commit 3c8399e

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-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: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,35 @@ 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.
136+
137+
On very rare cases, the Cargo team may decide to manually publish a new
138+
release to [crates.io]. For example, this may be necessary if there is a
139+
problem with the current version that only affects API users, and does not
140+
affect the `cargo` binary shipped in the stable release. In this situation,
141+
the patch version should be bumped, and then someone with permissions
142+
(currently a subset of the Cargo team, or the Release team) should publish it
143+
manually.
144+
145+
Some packages are not published automatically because they are not part of the
146+
Rust release train. These currently include all of the [`credential`] packages
147+
and the [`home`] package. These are published manually on an as-needed or
148+
as-requested basis by whoever has permissions (currently [@ehuss] or the
149+
Release/Infra team).
150+
151+
In the future, these manual publishing options should be integrated with
152+
GitHub Actions so that any team member can trigger them. Likely that should
153+
involve getting Infra to create scoped tokens that can be added as GitHub
154+
Secrets, and setting up GitHub Actions workflows with the appropriate
155+
permissions which can be manually triggered to launch a release.
156+
157+
[`home`]: https://github.com/rust-lang/cargo/tree/master/crates/home
158+
[`credential`]: https://github.com/rust-lang/cargo/tree/master/credential
135159
[`publish.py` script]: https://github.com/rust-lang/cargo/blob/master/publish.py
136160

137161
## Beta backports

0 commit comments

Comments
 (0)