7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 1 | # Releasing and publishing the SDK |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 2 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 3 | While the release process can be handled manually, `cargo-release` has been |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 4 | configured to make it more convenient. |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 5 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 6 | By default, [`cargo-release`](https://github.com/crate-ci/cargo-release) assumes |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 7 | that no pull request is required to cut a release. However, since the SDK |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 8 | repo is set up so that each push requires a pull request, we need to slightly |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 9 | deviate from the default workflow. A `cargo-xtask` has been created to make the |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 10 | process as smooth as possible. |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 11 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 12 | The procedure is as follows: |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 13 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 14 | 1. Switch to a release branch: |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 15 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 16 | ```bash |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 17 | git switch -c release-x.y.z |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 18 | ``` |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 19 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 20 | 2. Prepare the release. This will update the `README.md`, set the versions in |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 21 | the `CHANGELOG.md` file, and bump the version in the `Cargo.toml` file. |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 22 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 23 | ```bash |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 24 | cargo xtask release prepare --execute minor|patch|rc |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 25 | ``` |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 26 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 27 | 3. Double-check and edit the `CHANGELOG.md` and `README.md` if necessary. Once |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 28 | you are satisfied, push the branch and open a PR. |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 29 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 30 | ```bash |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 31 | git push --set-upstream origin/release-x.y.z |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 32 | ``` |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 33 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 34 | 4. Pass the review and merge the branch as you would with any other branch. |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 35 | 5. Create tags for your new release, publish the release on crates.io and push |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 36 | the tags: |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 37 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 38 | ```bash |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 39 | # Switch to main first. |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 40 | git switch main |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 41 | # Pull in the now-merged release commit(s). |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 42 | git pull |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 43 | # Create tags, publish the release on crates.io, and push the tags. |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 44 | cargo xtask release publish --execute |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 45 | ``` |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 46 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 47 | For more information on cargo-release: |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 48 | [https://github.com/crate-ci/cargo-release][https-github-com-crate-ci-cargo-release] |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 49 | |
7ff8adafe9e4 | atagen | 2026-10-22 12:30 UTC | 50 | [https-github-com-crate-ci-cargo-release]: https://github.com/crate-ci/cargo-release |