@@ -31,21 +31,26 @@ Here are a few things you can do that will increase the likelihood of your pull
3131
3232## Releasing a crate
3333
34- Crates are published to [ crates.io] ( https://crates.io ) with
35- [ Trusted Publishing] ( https://crates.io/docs/trusted-publishing ) , so there is no long-lived API
36- token stored in this repository. The ` Publish crates ` workflow exchanges its GitHub OIDC identity
37- for a token that is revoked when the run ends.
38-
39- 1 . Bump ` version ` in the crate's ` Cargo.toml ` and merge that change to ` main ` .
40- 2 . Run the [ ` Publish crates ` ] ( ../../actions/workflows/publish-crates.yaml ) workflow via
41- * Run workflow* , pick the crate, and optionally tick * dry-run* first to package and verify it
42- without uploading. If a newly added crate isn't in the dropdown yet, type its name into
43- * crate_name_override* instead — and add it to the dropdown in ` publish-crates.yaml ` while
44- you're there.
34+ Releases are managed with [ release-plz] ( https://release-plz.dev ) . Crates are published to
35+ [ crates.io] ( https://crates.io ) with [ Trusted Publishing] ( https://crates.io/docs/trusted-publishing ) ,
36+ so there is no long-lived API token stored in this repository. release-plz exchanges the
37+ workflow's GitHub OIDC identity for a token that is revoked when the run ends.
38+
39+ 1 . Run the [ ` Create release PR ` ] ( ../../actions/workflows/create-release-pr.yaml ) workflow via
40+ * Run workflow* . This uses ` release-plz ` to open a PR that bumps the versions and updates the
41+ changelogs of any crates that changed since their last release.
42+ 2 . Adjust the generated changelog(s) and version number(s) as necessary.
43+ 3 . Get PR approval.
44+ 4 . Merge the PR. The [ ` publish-release.yaml ` ] ( ../../actions/workflows/publish-release.yaml )
45+ workflow will automatically publish a new release of any crate whose version has changed,
46+ and create the matching git tag and GitHub release.
47+
48+ Development-only crates (benchmarks and tests) are excluded from releases in
49+ [ ` release-plz.toml ` ] ( release-plz.toml ) . Add new ones there too.
4550
4651A crate has to be published manually once before crates.io will let you configure a trusted
4752publisher for it. Configure it at ` https://crates.io/crates/<crate>/settings/trusted-publishing `
48- with repository ` github/rust-gems ` , workflow ` publish-crates .yaml ` , and environment ` crates-io ` .
53+ with repository ` github/rust-gems ` , workflow ` publish-release .yaml ` , and environment ` crates-io ` .
4954The environment name must match the workflow's ` environment: ` exactly or the token exchange fails.
5055
5156## Resources
0 commit comments