ref:3f18c30140ff3b8c681351b6b36a611f67b43436

fix(ci): pick the runner-native binary to drive release publish

build-runner.sh hardcoded ANVIL_CLI=$ARM64_BIN and used it for release list/create/upload. That only executes on an arm64 runner (carl); when the publish job lands on the amd64 runner (xps) it fails with target/aarch64-unknown-linux-gnu/release/anvil: cannot execute binary file: Exec format error (exit 126) so no release publishes and the server stays on an old version. Select the binary matching the runner's uname -m (arm64 -> arm64 build, x86_64 -> amd64 build). Both linux binaries are built in the job. Unblocks publishing the readiness fix (#29/#38) so runners can `anvil update`. Closes #30 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dd91csxNhqUxSB4SEzscXE
SHA: 3f18c30140ff3b8c681351b6b36a611f67b43436
Author: CI <ci@anvil.test>
Date: 2026-07-17 16:19
Parents: 656f31b
1 files changed +12 -1
Type
ci/build-runner.sh +12 −1
@@ -132,7 +132,18 @@
exit 0
fi
ANVIL_CLI="$PWD/$ARM64_BIN"
# Use the binary matching THIS runner's architecture to drive `release
# list`/`release create` — the publish job can land on either an arm64 (carl)
# or amd64 (xps) runner. Hardcoding the arm64 build here made publishing fail
# with "Exec format error" whenever the job ran on the amd64 runner.
case "$(uname -m)" in
aarch64 | arm64) ANVIL_CLI="$PWD/$ARM64_BIN" ;;
x86_64 | amd64) ANVIL_CLI="$PWD/$AMD64_BIN" ;;
*)
echo "ERROR: unsupported runner architecture: $(uname -m)" >&2
exit 1
;;
esac
echo "==> Publishing release $VERSION"
cp "$ARM64_BIN" "runner-dist/anvil_linux_arm64_${VERSION}"