ci(release): ship only tarballs (drop hardcoded platform cleanup)
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:
parent
7d0564cc45
commit
6637ecc9e2
@ -51,10 +51,14 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSION=${GITHUB_REF#refs/tags/}
|
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
|
for bin in build/gostations-* ; do
|
||||||
if [ ! -f "$bin" ]; then continue; fi
|
[ -f "$bin" ] || continue
|
||||||
OSARCH=$(basename "$bin" | sed 's/gostations-//' | sed 's/\.exe$//')
|
OSARCH=$(basename "$bin" | sed 's/gostations-//' | sed 's/\.exe$//')
|
||||||
tar czf "build/gostations-${OSARCH}-${VERSION}.tar.gz" -C build "$(basename "$bin")"
|
tar czf "build/gostations-${OSARCH}-${VERSION}.tar.gz" -C build "$(basename "$bin")"
|
||||||
|
rm -f "$bin"
|
||||||
done
|
done
|
||||||
sha256sum build/gostations-*.tar.gz | tee build/checksums.txt
|
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.sh ] && cp scripts/gostations-install.sh build/
|
||||||
[ -f scripts/gostations-install.ps1 ] && cp scripts/gostations-install.ps1 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
|
- name: Install dependencies
|
||||||
run: apt update && apt install -y jq
|
run: apt update && apt install -y jq
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user