From 3c25d8748b3ce4d75ac2c4378e0ecb1ff1898a23 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 26 Oct 2026 22:39:28 +0100 Subject: [PATCH] Compress blink Linux binaries with UPX in release build --- .github/workflows/buid_release.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/buid_release.yaml b/.github/workflows/buid_release.yaml index e2481b2384..db2f5a52c7 100644 --- a/.github/workflows/buid_release.yaml +++ b/.github/workflows/buid_release.yaml @@ -98,6 +98,8 @@ jobs: with: go-version: "1.26.10" + - run: sudo apt-get update && sudo apt-get install -y upx-ucl + - run: | for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64; do suffix="" @@ -105,6 +107,9 @@ jobs: (cd blink && CGO_ENABLED=0 GOOS=${target%/*} GOARCH=${target#*/} go build -trimpath -ldflags="-s -w" -o "$GITHUB_WORKSPACE/ecs-prefixed-downgraded/bin/blink-${target%/*}-${target#*/}${suffix}" .) done + # compress Linux binaries only; UPX is reliable there, but breaks code-signing on macOS and trips antivirus on Windows + upx --best --lzma ecs-prefixed-downgraded/bin/blink-linux-amd64 ecs-prefixed-downgraded/bin/blink-linux-arm64 + chmod 755 ecs-prefixed-downgraded/bin/blink-* # 6. clone remote repository, so we can push it