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