cargo-dist is very, very good, and you should check it out if you do releases on GitHub. I made my first release ever in two minutes of effort.

77 points lynndotpy

Go check it out! https://opensource.axo.dev/cargo-dist

I'm just here to share my experience with cargo-dist. I can't believe I haven't heard about it before, and now I want to stand on rooftops and shout at people about it.

TLDR: With cargo-dist, it took five minutes of setup for me to get a spiffy "releases" page on my GitHub repo. It does all the release engineering work.

What cargo-dist does is automatically set up GitHub Actions to build your project and publish a "release" on the "releases" page.

You should read the quickstart guide, but let me just show you an (amended) bash history:

# Stuff I did to setup cargo-dist and release with it
# Install cargo-dist
cargo install cargo-dist

cd projects/reso
vim Cargo.toml # to update my minor version number

# Set up `cargo-dist` in my project repo
# Creates .github folder, and interactively choose platforms + installers
cargo dist init

# Normal git stuff
git add .
git commit -m "woah"
git push

# Tag your release
git tag "v0.0.6"
git push --tags

# I also want to push to crates.io, but this isn't necessary
cargo publish

Then, I went to my pull request, and saw thirteen steps for GitHub Actions, instantiated using cargo dist.

I merged it, and bam! There was a spiffy professional-looking releases page, with download links, scripts, and checksums!

I just tried it again, this time working in the main branch, and it was also super fast.

# workflow for publishing new releases
git commit -m "la la la "
git push
cargo publish

# tag it to make a new release
# this is the only 'extra work' i do to get a new release now
git tag "v0.0.7"
git push --tags

I started using Rust because cargo was so good and easy, but I didn't know things could get this good and easy.

To get releases, the only extra work I have to do now is tag versions. My mind is boggled. This is awesome.