-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Add automated multi-platform binary distribution for the rivetdb CLI using cargo-dist.
This will allow users to install the binary via Homebrew, .deb, .rpm, or tarball, and will automate releases through GitHub Actions.
This work includes adding cargo-dist configuration, setting up a Homebrew tap, configuring CI, and validating release builds.
Goals
- Build and publish binaries for:
- macOS (x86_64 + aarch64)
- Linux (x86_64 + aarch64)
- Automatically generate:
- Homebrew formula (and push to tap repo)
.deband.rpmpackages- installer shell script
- tarball artifacts
- Automatically upload all artifacts to GitHub Releases when tagging a version.
- Ensure developers can install via:
brew install rivetdb
Non-Goals
- Publishing to official apt / yum repositories.
- Publishing to npm.
- Windows support (possible future work).
Implementation Plan
1. Add cargo-dist configuration
Create dist/dist.toml:
[workspace]
members = ["rivetdb"]
[package.rivetdb]
dist = true
bin = "rivetdb"
[dist]
features = ["brew", "shell", "github"]
targets = [
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"aarch64-apple-darwin"
]
artifacts = ["tarball", "deb", "rpm"]
installers = ["homebrew", "shell"]
[dist.github]
tap = "hotdata-dev/homebrew-tap"
tap-branch = "main"2. Create Homebrew tap repo
Create public repo: hotdata-dev/homebrew-tap (empty).
cargo-dist will push formula updates here automatically.
3. Add GitHub Actions Workflow
Create .github/workflows/release.yml:
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
discussions: write
packages: write
id-token: write
jobs:
dist:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-dist
uses: taiki-e/install-action@v2
with:
tool: cargo-dist
- name: Build & Publish Artifacts
run: |
cargo dist build
cargo dist manifest
cargo dist publish --github-token "${{ secrets.GITHUB_TOKEN }}"4. Validate Build Locally
Run:
cargo install cargo-dist
cargo dist buildVerify:
- all targets build
.deb/.rpmgenerate- tarballs contain working binaries
- installer script exists under
dist/
5. Publish First Release
Tag and push:
git tag v0.1.0
git push --tagsThis triggers the full build + deploy pipeline.
6. Verify Installation (Against GitHub Releases)
Once a tagged release (e.g. v0.1.0) has been created and the GitHub Action has completed, verify installation using the artifacts from the GitHub Release.
6.1 Homebrew (macOS / Linux)
brew tap hotdata-dev/homebrew-tap
brew install rivetdb
rivetdb --versionrivetdb --version should match the tag version.
6.2 Debian/Ubuntu .deb from GitHub Releases
- Go to:
https://github.com/hotdata-dev/rivetdb/releases - Open the release for the tag.
- Copy the URL of the
.debartifact (e.g.rivetdb_0.1.0_amd64.deb).
VERSION=v0.1.0
DEB_URL="https://github.com/hotdata-dev/rivetdb/releases/download/${VERSION}/<deb-file>.deb"
curl -LO "${DEB_URL}"
sudo apt install ./<deb-file>.deb
rivetdb --version6.3 RPM (Fedora / RHEL / Amazon Linux)
- Go to the release page.
- Copy the URL of the
.rpmartifact.
VERSION=v0.1.0
RPM_URL="https://github.com/hotdata-dev/rivetdb/releases/download/${VERSION}/<rpm-file>.rpm"
curl -LO "${RPM_URL}"
sudo rpm -i <rpm-file>.rpm
rivetdb --version6.4 Direct tarball install
VERSION=v0.1.0
TARBALL_URL="https://github.com/hotdata-dev/rivetdb/releases/download/${VERSION}/<tarball>.tar.gz"
curl -LO "${TARBALL_URL}"
tar -xzf <tarball>.tar.gz
sudo mv rivetdb /usr/local/bin/
rivetdb --versionAcceptance Criteria
-
dist/dist.tomlcreated and correct - GitHub Actions workflow working
- Homebrew tap receives auto-generated formula
- Release artifacts generated:
- tarballs
-
.deb -
.rpm - installer script
- Install works via Homebrew
- Install works via
.deband.rpm - Artifacts appear in GitHub Releases
Follow-Up Tickets
- Windows support via Scoop
- Nix flake support
- Official apt/yum repo hosting
- Binary signing / SLSA provenance