ref:12ff11a625a05db13c3a620875f0e7dfd8f5b940

ci: publish SHA256SUMS alongside release binaries

The server's install script verifies downloaded binaries against a SHA256SUMS manifest. Publish one per release so the verification succeeds; standard `sha256sum` format (hash + two spaces + filename) so `shasum -a 256` and `sha256sum` both parse it. Asset name: SHA256SUMS_{version}. Pairs with fangorn/anvil#49 which adds /runner/checksums serving this asset and updates the install script to verify against it. Refs #1 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SHA: 12ff11a625a05db13c3a620875f0e7dfd8f5b940
Author: Cole Christensen <cole.christensen@macmillan.com>
Date: 2026-04-17 03:09
Parents: 1e07ac2
1 files changed +19 -0
Type
ci/build-runner.sh +19 −0
@@ -56,6 +56,22 @@
cp target/release/anvil "runner-dist/anvil_linux_arm64_${VERSION}"
cp target/x86_64-unknown-linux-gnu/release/anvil "runner-dist/anvil_linux_amd64_${VERSION}"
# Compute SHA256 checksums for every versioned asset — published as
# SHA256SUMS_${VERSION} alongside the binaries so install scripts can
# verify what they downloaded. Format matches `shasum -a 256` /
# `sha256sum` output: `<hash> <filename>`.
echo "==> Computing SHA256 checksums..."
(
cd runner-dist
# Use whichever is available; macOS has shasum, Linux has sha256sum.
if command -v sha256sum >/dev/null 2>&1; then
sha256sum "anvil_linux_arm64_${VERSION}" "anvil_linux_amd64_${VERSION}" > "SHA256SUMS_${VERSION}"
else
shasum -a 256 "anvil_linux_arm64_${VERSION}" "anvil_linux_amd64_${VERSION}" > "SHA256SUMS_${VERSION}"
fi
)
cat "runner-dist/SHA256SUMS_${VERSION}"
# Generate changelog body from commits since the previous CalVer tag.
PREV_TAG=$("$ANVIL_CLI" release list --format json fangorn/anvil-cli \
| jq -r '[.[] | select(.tag_name | test("^[0-9]{4}\\.[0-9]{2}\\.[0-9]+$"))]
@@ -87,6 +103,9 @@
--repo fangorn/anvil-cli
"$ANVIL_CLI" release upload "$VERSION" \
"runner-dist/anvil_linux_amd64_${VERSION}" \
--repo fangorn/anvil-cli
"$ANVIL_CLI" release upload "$VERSION" \
"runner-dist/SHA256SUMS_${VERSION}" \
--repo fangorn/anvil-cli
trap - ERR