-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Releasing and publishing the SDK | ||
|
||
While the release process can be handled manually, `cargo-release` has been | ||
configured to make it more convenient. | ||
|
||
By default, [`cargo-release`](https://github.com/crate-ci/cargo-release) assumes | ||
that no pull request is required to cut a release. However, since the SDK | ||
repo is set up so that each push requires a pull request, we need to slightly | ||
deviate from the default workflow. A `cargo-xtask` has been created to make the | ||
process as smooth as possible. | ||
|
||
The procedure is as follows: | ||
|
||
1. Switch to a release branch: | ||
|
||
```bash | ||
git switch -c release-x.y.z | ||
``` | ||
2. Prepare the release. This will update the `README.md`, prepend the `CHANGELOG.md` | ||
file using `git cliff`, and bump the version in the `Cargo.toml` file. | ||
```bash | ||
cargo xtask release prepare --execute minor|patch|rc | ||
``` | ||
|
||
3. Double-check and edit the `CHANGELOG.md` and `README.md` if necessary. Once you are | ||
satisfied, push the branch and open a PR. | ||
|
||
```bash | ||
git push --set-upstream origin/release-x.y.z | ||
``` | ||
|
||
4. Pass the review and merge the branch as you would with any other branch. | ||
|
||
5. Create tags for your new release, publish the release on crates.io and push | ||
the tags: | ||
|
||
```bash | ||
# Switch to main first. | ||
git switch main | ||
# Pull in the now-merged release commit(s). | ||
git pull | ||
# Create tags, publish the release on crates.io, and push the tags. | ||
cargo xtask release publish --execute | ||
``` | ||
For more information on cargo-release: https://github.com/crate-ci/cargo-release |