How to cut a release with verified install. Every release must follow this process so the one-liner install stays secure.
The install script (scripts/install.sh) is served from GitHub, not from a VPS. This means:
- Compromising the VPS does not compromise the installer. The script URL points at
raw.githubusercontent.comat a specific tag, which is immutable. - The binary is verified. The install script downloads both the binary and
checksums.txtfrom the same GitHub Release, then verifies SHA256 before executing. - All source is public. Anyone can audit the script, build from source, and verify the binary matches.
An attacker would need to compromise GitHub (or the repo owner's credentials) to tamper with the install. This is a much higher bar than compromising a VPS.
Edit internal/version/version.go:
const Version = "X.Y.Z"make releaseThis produces:
dist/anvil-linux-amd64dist/anvil-linux-arm64dist/checksums.txt(SHA256 hashes of both binaries)
cd dist && sha256sum -c checksums.txtUpdate the one-liner in README.md to point at the new tag:
curl -fsSL https://raw.githubusercontent.com/BSVanon/Anvil/vX.Y.Z/scripts/install.sh | sudo bashgit add -A
git commit -m "Bump version to X.Y.Z"
git tag -a vX.Y.Z -m "vX.Y.Z: <summary>"
git push origin main --tagsgh release create vX.Y.Z dist/anvil-linux-amd64 dist/anvil-linux-arm64 dist/checksums.txt \
--title "vX.Y.Z" \
--notes "Release notes here"Upload all three files: both binaries and checksums.txt.
On a clean machine (or VM):
curl -fsSL https://raw.githubusercontent.com/BSVanon/Anvil/vX.Y.Z/scripts/install.sh | sudo bashThe installer should show ✓ SHA256 verified during step 1.
- Detects architecture (amd64 or arm64)
- Downloads binary from
github.com/BSVanon/Anvil/releases/download/vX.Y.Z/anvil-linux-{arch} - Downloads
checksums.txtfrom the same release - Extracts expected SHA256 for the architecture, computes actual SHA256, compares
- Aborts with error if mismatch (possible tampering)
- If verified, installs binary, runs
anvil deploy, starts systemd service
Pin to a specific tag (immutable on GitHub):
curl -fsSL https://raw.githubusercontent.com/BSVanon/Anvil/v1.1.1/scripts/install.sh | sudo bashOr clone and build from source:
git clone https://github.com/BSVanon/Anvil.git
cd Anvil
git checkout v1.1.1
make build
sudo ./anvil deploy --nodes a --seed wss://anvil.sendbsv.com/mesh