ci(release): ship only tarballs (drop hardcoded platform cleanup)
All checks were successful
CI / Test (push) Successful in 56s
CI / Build (push) Successful in 43s

Consistency with the shared release template: tar each binary and rm it in
the same loop rather than cleaning a hardcoded platform list. No behavior
change for gostations' current 5-platform matrix, but robust if it grows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Greg Gauthier 2026-06-13 08:46:01 +01:00
parent 7d0564cc45
commit 6637ecc9e2

View File

@ -51,10 +51,14 @@ jobs:
shell: bash
run: |
VERSION=${GITHUB_REF#refs/tags/}
# Tar each platform binary and remove the raw binary as we go, so we
# ship only the .tar.gz files (matrix-agnostic; the glob expands once
# at loop start, before any tarballs exist).
for bin in build/gostations-* ; do
if [ ! -f "$bin" ]; then continue; fi
[ -f "$bin" ] || continue
OSARCH=$(basename "$bin" | sed 's/gostations-//' | sed 's/\.exe$//')
tar czf "build/gostations-${OSARCH}-${VERSION}.tar.gz" -C build "$(basename "$bin")"
rm -f "$bin"
done
sha256sum build/gostations-*.tar.gz | tee build/checksums.txt
@ -62,15 +66,6 @@ jobs:
[ -f scripts/gostations-install.sh ] && cp scripts/gostations-install.sh build/
[ -f scripts/gostations-install.ps1 ] && cp scripts/gostations-install.ps1 build/
# Clean raw binaries (we ship the tarballs)
for plat in 'linux/amd64' 'linux/arm64' 'darwin/amd64' 'darwin/arm64' 'windows/amd64'; do
OS=$(echo "$plat" | cut -d/ -f1)
ARCH=$(echo "$plat" | cut -d/ -f2)
BIN="gostations-${OS}-${ARCH}"
if [ "$OS" = "windows" ]; then BIN="${BIN}.exe"; fi
rm -f "build/${BIN}"
done
- name: Install dependencies
run: apt update && apt install -y jq