Assuming you are making a release to get the latest Rust code, you should bump
the version of matrix-rust-sdk
we are depending on in Cargo.lock
.
At time of writing, Cargo.toml has git = "https://github.com/matrix-org/matrix-rust-sdk"
,
which picks up the latest version on the default branch in Git. This means that
we can update the version by following these steps:
- Ensure
.cargo/config
does not contain thepatch
section for local development recommended inREADME.md
. - Run
cargo update
.
We try to use semantic versioning, so the version number is
v<major>.<minor>.<patch>
. Most releases will be a minor version. If there are
significant breaking changes, bump the major version number. If you're only
making minor fixes to the bindings themselves, a patch version may be
appropriate.
Note: the cargo update
process above will often bring in significant
changes to a number of dependencies. These are not normally appropriate in a
patch version.
- Create a new branch, named
release-v<version>
. - Replace the "UNRELEASED" heading in
CHANGELOG.md
with the new version number, start a new (empty) "UNRELEASED" section, andgit add
ready for commit on the next step. - Run
yarn version
. It will ask you the version number, then updatepackage.json
, commit, and create a tag. - Push the branch, but not yet the tag.
- Create a PR to approve the changes. Reviewers should mostly check that the changelog is coherent.
- Once approved:
- Update the git tag to the new head of the branch, if necessary.
- Push the git tag (
git push origin tag v<version>
). Doing so triggers the github actions workflow which builds and publishes to npm, and creates a draft GH release. - Merge the PR. (Prefer a genuine merge rather than a squash so that the tagged commit is included in the history.)
- Update the release on github and publish.