All releases of this repository are normally made by GitHub Actions when release Git tag is pushed. Manual releasing should be avoided asap.
-
Ensure crate's dependencies do NOT contain
path
option inCargo.toml
.
While referring local dependency viapath
is neat and helpful for development, it cannot be used for publishing a release version to crates.io. -
Set the correct crate version in its
Cargo.toml
.
Usually, this is a change fromx.y.z-dev
tox.y.z
. Ensure version bump follows Semantic Versioning 2.0.0. -
Check release build succeeds with
cargo package
.
To be sure that crate will be released OK on crates.io runmake release.crates crate=<crate-name> publish=no
and fix any appeared errors. -
Correct and prepare crate's
CHANGELOG.md
.
All its user-facing changes should be described explicitly and clear. It should contain links to all related milestones and roadmaps of this release. It should contain the correct version and date of release.
-
Commit all the changes for the prepared release with a commit message:
Prepare <version> release of '<crate-name>' crate
-
Apply Git version tag of the release. Its format must be
<crate-name>-<version>
. For example:medea-macro-3.2.1
to release3.2.1
version ofmedea-macro
crate;medea-2.4.8-beta.1
to release2.4.8-beta.1
version ofmedea
crate.
-
Push the version tag to GitHub.
After release there is no need to switch crate's version back to x.y.z-dev
and refer its local dependencies with path
option immediately. Just do it when your development process would really require a such change.
If somehow the incorrect code has been released, the following steps should be done:
- Yank the broken version of released crate on crates.io.
- Apply the necessary fixes to the code base.
- Bump up patch version of the crate.
- Prepare its release and push it.
To perform a full releasing process manually, carefully examine Releasing
section of .github/workflows/ci.yml
spec and repeat the necessary actions. Beware that releasing process may involve publishing not only to crates.io, but also to GitHub Releases, NPM and GitHub Pages (Helm chats, etc).