Skip to content

Commit a5d2264

Browse files
ci(release): smoke-test packaged binaries' --version before attaching (#59)
The release-binaries job packaged gl, git-remote-gitlawb, and gitlawb-node into the release tarball but never ran them, so a broken artifact could ship. This is the follow-up promised in #30 and the gap noted in OSS-READINESS-AUDIT ("release binaries are not smoke-tested after packaging"), now unblocked by git-remote-gitlawb gaining --version. Run each binary's --version after build and assert the released version string is present. Skipped for aarch64-unknown-linux-musl, which is cross-compiled and can't execute on the x86_64 runner. Co-authored-by: FrozenRaspberry <3733873+FrozenRaspberry@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5ff7af8 commit a5d2264

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,27 @@ jobs:
146146
- name: Build
147147
run: cargo build --release --target ${{ matrix.target }} -p gl -p git-remote-gitlawb -p gitlawb-node
148148

149+
# Run each packaged binary's --version so a broken release artifact fails the
150+
# build instead of shipping. Skipped for cross-compiled targets that can't run
151+
# on the host runner (aarch64 linux on an x86_64 runner).
152+
- name: Smoke test binaries
153+
if: ${{ matrix.target != 'aarch64-unknown-linux-musl' }}
154+
shell: bash
155+
run: |
156+
set -euo pipefail
157+
VERSION="${{ needs.release-please.outputs.version }}"
158+
BIN_DIR="target/${{ matrix.target }}/release"
159+
for bin in gl git-remote-gitlawb gitlawb-node; do
160+
echo "== $bin --version =="
161+
out="$("$BIN_DIR/$bin" --version)"
162+
echo "$out"
163+
# Each binary prints "<name> <version>"; assert the released version is present.
164+
grep -qF "$VERSION" <<<"$out" || {
165+
echo "::error::$bin --version did not report expected version $VERSION (got: $out)"
166+
exit 1
167+
}
168+
done
169+
149170
- name: Package
150171
id: pkg
151172
shell: bash

0 commit comments

Comments
 (0)