Skip to content

Commit 9736f32

Browse files
committed
Auto merge of #14539 - ehuss:update-release-docs, r=weihanglo
Update docs for how cargo is published This updates the docs for publishing crates in this repo after the changes from #14202.
2 parents e7ca9be + b9b1873 commit 9736f32

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

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

+17-16
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Every night at 00:00 UTC, the artifacts from the most recently merged PR are
2626
promoted to the nightly release channel. A similar process happens for beta
2727
and stable releases.
2828

29-
[`dist` bootstrap module]: https://github.com/rust-lang/rust/blob/master/src/bootstrap/dist.rs
29+
[`dist` bootstrap module]: https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/core/build_steps/dist.rs
3030

3131
## Submodule updates
3232

@@ -123,38 +123,39 @@ stable) and the release-specific URL such as
123123
The code that builds the documentation is located in the [`doc` bootstrap
124124
module].
125125

126-
[`doc` bootstrap module]: https://github.com/rust-lang/rust/blob/master/src/bootstrap/doc.rs
126+
[`doc` bootstrap module]: https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/core/build_steps/doc.rs
127127

128128
## crates.io publishing
129129

130130
Cargo's library and its related dependencies (like `cargo-util`) are published
131131
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 build tool crates aren't published.
135-
This runs on the specific git commit associated with the cargo submodule in the
136-
`stable` branch in `rust-lang/rust` at the time of release.
132+
team]. The release process involves a series of steps:
133+
134+
1. The Release team's automation scripts (see <https://github.com/rust-lang/simpleinfra/>) will run [`promote-release`] which will create a tag in the `rust-lang/cargo` repository associated with the version of the cargo submodule for that release.
135+
2. The creation of a tag will trigger the [release workflow] in `rust-lang/cargo`.
136+
3. The release workflow will run the [`publish.py` script] on the commit associated with the tag.
137+
4. The `publish.py` script will run `cargo publish` on any crates that are not already published.
138+
139+
[`promote-release`]: https://github.com/rust-lang/promote-release
140+
[release workflow]: https://github.com/rust-lang/cargo/blob/master/.github/workflows/release.yml
137141

138142
On very rare cases, the Cargo team may decide to manually publish a new
139143
release to [crates.io]. For example, this may be necessary if there is a
140144
problem with the current version that only affects API users, and does not
141145
affect the `cargo` binary shipped in the stable release. In this situation,
142146
PRs should be merged to the associated stable release branch in the cargo repo
143147
(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`.
148+
affected package. Then you need to work with the Release Team to get a release
149+
published to crates.io.[^release-problem]
147150

148151
Some packages are not published automatically because they are not part of the
149152
Rust release train. This currently only includes the [`home`] package. These
150153
are published manually on an as-needed or as-requested basis by whoever has
151-
permissions (currently [@ehuss] or the Release/Infra team).
154+
permissions (currently [@ehuss] or the Release/Infra team)[^fix-manual-release].
155+
156+
[^release-problem]: Unfortunately there are some complications with this process. See <https://github.com/rust-lang/cargo/issues/14538> for more detail, and thoughts on how to improve this.
152157

153-
In the future, these manual publishing options should be integrated with
154-
GitHub Actions so that any team member can trigger them. Likely that should
155-
involve getting Infra to create scoped tokens that can be added as GitHub
156-
Secrets, and setting up GitHub Actions workflows with the appropriate
157-
permissions which can be manually triggered to launch a release.
158+
[^fix-manual-release]: This should be fixed, see [crate ownership policy](https://forge.rust-lang.org/policies/crate-ownership.html) about removing ownership. Also see <https://github.com/rust-lang/cargo/issues/14538> for problems with tagging. In general, these should be published from GitHub Actions, but we don't have the infrastructure set up for that, yet.
158159

159160
[`home`]: https://github.com/rust-lang/cargo/tree/master/crates/home
160161
[`publish.py` script]: https://github.com/rust-lang/cargo/blob/master/publish.py

0 commit comments

Comments
 (0)