atagen

matrix-rust-sdk

public
Star0
Watch0
ssh://brewery@pls.lobotomise.me:33/atagen/matrix-rust-sdk.git

Blame: RELEASING.md

7ff8adafe9e4atagen2026-10-22 12:30 UTC1
# Releasing and publishing the SDK
7ff8adafe9e4atagen2026-10-22 12:30 UTC2
7ff8adafe9e4atagen2026-10-22 12:30 UTC3
While the release process can be handled manually, `cargo-release` has been
7ff8adafe9e4atagen2026-10-22 12:30 UTC4
configured to make it more convenient.
7ff8adafe9e4atagen2026-10-22 12:30 UTC5
7ff8adafe9e4atagen2026-10-22 12:30 UTC6
By default, [`cargo-release`](https://github.com/crate-ci/cargo-release) assumes
7ff8adafe9e4atagen2026-10-22 12:30 UTC7
that no pull request is required to cut a release. However, since the SDK
7ff8adafe9e4atagen2026-10-22 12:30 UTC8
repo is set up so that each push requires a pull request, we need to slightly
7ff8adafe9e4atagen2026-10-22 12:30 UTC9
deviate from the default workflow. A `cargo-xtask` has been created to make the
7ff8adafe9e4atagen2026-10-22 12:30 UTC10
process as smooth as possible.
7ff8adafe9e4atagen2026-10-22 12:30 UTC11
7ff8adafe9e4atagen2026-10-22 12:30 UTC12
The procedure is as follows:
7ff8adafe9e4atagen2026-10-22 12:30 UTC13
7ff8adafe9e4atagen2026-10-22 12:30 UTC14
1. Switch to a release branch:
7ff8adafe9e4atagen2026-10-22 12:30 UTC15
7ff8adafe9e4atagen2026-10-22 12:30 UTC16
   ```bash
7ff8adafe9e4atagen2026-10-22 12:30 UTC17
   git switch -c release-x.y.z
7ff8adafe9e4atagen2026-10-22 12:30 UTC18
   ```
7ff8adafe9e4atagen2026-10-22 12:30 UTC19
7ff8adafe9e4atagen2026-10-22 12:30 UTC20
2. Prepare the release. This will update the `README.md`, set the versions in
7ff8adafe9e4atagen2026-10-22 12:30 UTC21
   the `CHANGELOG.md` file, and bump the version in the `Cargo.toml` file.
7ff8adafe9e4atagen2026-10-22 12:30 UTC22
7ff8adafe9e4atagen2026-10-22 12:30 UTC23
   ```bash
7ff8adafe9e4atagen2026-10-22 12:30 UTC24
   cargo xtask release prepare --execute minor|patch|rc
7ff8adafe9e4atagen2026-10-22 12:30 UTC25
   ```
7ff8adafe9e4atagen2026-10-22 12:30 UTC26
7ff8adafe9e4atagen2026-10-22 12:30 UTC27
3. Double-check and edit the `CHANGELOG.md` and `README.md` if necessary. Once
7ff8adafe9e4atagen2026-10-22 12:30 UTC28
   you are satisfied, push the branch and open a PR.
7ff8adafe9e4atagen2026-10-22 12:30 UTC29
7ff8adafe9e4atagen2026-10-22 12:30 UTC30
   ```bash
7ff8adafe9e4atagen2026-10-22 12:30 UTC31
   git push --set-upstream origin/release-x.y.z
7ff8adafe9e4atagen2026-10-22 12:30 UTC32
   ```
7ff8adafe9e4atagen2026-10-22 12:30 UTC33
7ff8adafe9e4atagen2026-10-22 12:30 UTC34
4. Pass the review and merge the branch as you would with any other branch.
7ff8adafe9e4atagen2026-10-22 12:30 UTC35
5. Create tags for your new release, publish the release on crates.io and push
7ff8adafe9e4atagen2026-10-22 12:30 UTC36
   the tags:
7ff8adafe9e4atagen2026-10-22 12:30 UTC37
7ff8adafe9e4atagen2026-10-22 12:30 UTC38
   ```bash
7ff8adafe9e4atagen2026-10-22 12:30 UTC39
   # Switch to main first.
7ff8adafe9e4atagen2026-10-22 12:30 UTC40
   git switch main
7ff8adafe9e4atagen2026-10-22 12:30 UTC41
   # Pull in the now-merged release commit(s).
7ff8adafe9e4atagen2026-10-22 12:30 UTC42
   git pull
7ff8adafe9e4atagen2026-10-22 12:30 UTC43
   # Create tags, publish the release on crates.io, and push the tags.
7ff8adafe9e4atagen2026-10-22 12:30 UTC44
   cargo xtask release publish --execute
7ff8adafe9e4atagen2026-10-22 12:30 UTC45
   ```
7ff8adafe9e4atagen2026-10-22 12:30 UTC46
7ff8adafe9e4atagen2026-10-22 12:30 UTC47
   For more information on cargo-release:
7ff8adafe9e4atagen2026-10-22 12:30 UTC48
   [https://github.com/crate-ci/cargo-release][https-github-com-crate-ci-cargo-release]
7ff8adafe9e4atagen2026-10-22 12:30 UTC49
7ff8adafe9e4atagen2026-10-22 12:30 UTC50
[https-github-com-crate-ci-cargo-release]: https://github.com/crate-ci/cargo-release