Closed miraclx closed 1 year ago
This is very nice. Feels like it deserves to be its own independent Github Action. @miraclx have you considered this?
Also, the release process is valuable knowledge, so lets put it in some visible place like RELEASE.md
.
This introduces a CI workflow that automates GitHub releases as well as publishing to crates.io.
How to update versions
Cargo.toml
file.Cargo.lock
file is also updated.Unreleased
section of theCHANGELOG.md
file to a versioned section.How it works
Unlike most workflows, this doesn't trigger on a tag push. Instead, the first job in the workflow checks for a version bump to the
Cargo.toml
file when merged to master.If a version bump was detected, we check if that version has already been published to crates.io. If it hasn't, we publish the crate. The second part of this, is checking if the tag already exists on GitHub. If it doesn't, we proceed with the release process.
The release process builds binaries for multiple platforms, and makes them available for download from the final release page as archives, including hashes of each archive in the release note, in case users need to verify them. This also tags the contributors that made the release happen, links to the version of the crate on crates.io, and appropriately tags pre-release versions on GitHub.
Now for some cases