From 6637ecc9e231ebfe2543d3d01638423aac725318 Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Sat, 13 Jun 2026 08:46:01 +0100 Subject: [PATCH] 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 --- .gitea/workflows/release.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 784227b..b2bc39c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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