These steps assume that you've checked out the staking-miner repository and are in the root directory of it.
We also assume that ongoing work done is being merged directly to the main
branch.
-
Ensure that everything you'd like to see released is on the
main
branch. -
Create a release branch off
main
, for examplechore-release-v0.15.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. -
Bump the crate version in
Cargo.toml
to whatever was decided in step 2. The easiest approach is to search and replace, checking that you didn't replace any other crate versions along the way. -
Update
CHANGELOG.md
to reflect the difference between this release and the last. If you're unsure of what to add, check with the Tools team. See theCHANGELOG.md
file 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. This will help people to understand the impact of the change and what they need to do to adopt it.
Next, you can use the following script to generate the merged PRs between releases:
./scripts/generate_changelog.sh
Ensure that the script picked the latest published release tag (e.g. if releasing
v0.15.0
, the script should provide something like[+] Latest release tag: v0.14.0
). Then group the PRs into "Fixed", "Added" and "Changed" sections, and make any other adjustments that you feel are necessary for clarity. -
Commit any of the above changes to the release branch and open a PR in GitHub with a base of
main
. Name the branch something likechore(release): v0.15.0
. -
Once the branch has been reviewed and passes CI, merge it.
-
Run tests against the latest polkadot release:
git clone https://github.com/paritytech/polkadot && cd polkadot git checkout v0.9.33 # use the release you want to test against cargo build --features fast-runtime cp ./target/debug/polkadot /usr/local/bin/polkadot # have the polkadot binary in your path requires by the tests. cd .. # assumes you were in the staking-miner repo cargo test --features slow-tests -- --nocapture
-
Now, we're ready to publish the release to crates.io. Run
cargo publish
to do that. -
If the release was successful, tag the commit that we released in the
main
branch with the version that we just released, for example:git tag -s v0.15.0 # use the version number you've just published to crates.io, not this git push --tags
Once 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
main
above. Copy the changelog comments for the current release into the release description.