Previously on #rust:
- Check Github for third-party pull requests as I don’t want to annoy contributors by seeming to ignore their work. This check can be automated using a badge:
- Update Cargo.toml and CHANGELOG.md for all packages being released, like in commit 4ba3675c. If the package being released is depended on by other parts of Cotton, update their Cargo.toml dependencies too, like in commit c989d9f1.
- Check that everything is pushed upstream, both to
self-hosted
CI and to Github.
git push main git push github main
- Check that both CI pipelines are passing; again,
there’s a badge for the Github
one:
If your CI includes statistical metrics (as opposed to pass/fail ones: coverage, for example), check that those are in acceptable ranges too.
- Do a dry-run publish, remembering to cd to
the crate directory, not the workspace root:
Cargo will check that the package is buildable; if any errors occur, fix them and go back to Step 3.
cargo publish --dry-run
- Tag the release, using multiple tags if multiple crates are being
released:
git tag cotton-ssdp-0.0.3
- Push the new tag to both upstreams:
git push cotton-ssdp-0.0.3 git push github cotton-ssdp-0.0.3
- Actually publish the crate on crates.io:
Hopefully there won’t be any errors, given that the dry-run succeeded.
cargo publish
- Let any contributors know that their stuff is now in a release – if any pull requests have been merged, now is the time to let those contributors know that they can go back to using real upstream releases of your crate, and potentially stop maintaining their forks.