These steps assume that you've checked out the Subxt repository and are in the root directory of it.
We also assume that ongoing work done is being merged directly to the master branch.
-
Ensure that everything you'd like to see released is on the
masterbranch. -
Create a release branch off
master, for examplerelease-v0.17.0. Decide how far the version needs to be bumped based on the changes to date. If unsure what to bump the version to (e.g. is it a major, minor or patch release), check with the Parity Tools team. -
Check that you're happy with the current documentation.
cargo doc --openCI checks for broken internal links at the moment. Optionally you can also confirm that any external links are still valid like so:
cargo install cargo-deadlinks cargo deadlinks --check-httpIf there are minor issues with the documentation, they can be fixed in the release branch.
-
Bump the crate versions in the root
Cargo.tomlto whatever was decided in step 2 (basically a find and replace from old version to new version in this file should do the trick). -
Ensure the
Cargo.lockfile is up to date.cargo generate-lockfile -
Update
CHANGELOG.mdto reflect the difference between this release and the last. If you're unsure of what to add, check with the Tools team. See theCHANGELOG.mdfile for details of the format it follows.First, if there have been any significant changes, add a description of those changes to the top of the changelog entry for this release.
Next, you can use the following script to generate the merged PRs between releases:
./scripts/generate_changelog.shEnsure that the script picked the latest published release tag (e.g. if releasing
v0.17.0, the script should provide[+] Latest release tag: v0.16.0). Then group the PRs into "Fixed", "Added" and "Changed" sections, and make any other adjustments that you feel are necessary for clarity. -
If any of the differences impact the minimum version of
rustcthat the code will run on, please update therust-versionfield in the rootCargo.tomlaccordingly. -
Commit any of the above changes to the release branch and open a PR in GitHub with a base of
master. -
Once the branch has been reviewed and passes CI, merge it.
-
Now, we're ready to publish the release to crates.io.
-
Checkout
master, ensuring we're looking at that latest merge (git pull).git checkout master && git pull -
Perform a final sanity check that everything looks ok.
cargo test --all-targets -
Run the following command to publish each crate in the required order.
Prior to running this, you'll need to remove the dev dependencies in
subxt-metadataandsubxtto avoid circular dependencies and commit those or append--allow-dirtyto each of the following.(cd utils/strip-metadata && cargo publish) && \ (cd utils/fetch-metadata && cargo publish) && \ (cd utils/accountid32 && cargo publish) && \ (cd lightclient && cargo publish) && \ (cd metadata && cargo publish) && \ (cd codegen && cargo publish) && \ (cd macro && cargo publish) && \ (cd rpcs && cargo publish) && \ (cd subxt && cargo publish) && \ (cd signer && cargo publish) && \ (cd cli && cargo publish);You MUST remember to
git reset HEAD~1after this to avoid committing the dev dependency removal.
-
-
If the release was successful, tag the commit that we released in the
masterbranch with the version that we just released, for example:git tag -s v0.17.0 # use the version number you've just published to crates.io, not this one git push --tagsOnce this is pushed, go along to the releases page on GitHub and draft a new release which points to the tag you just pushed to
masterabove. Copy the changelog comments for the current release into the release description.