From 6d46ef0977fb835023d36497ba5c97389cdec476 Mon Sep 17 00:00:00 2001 From: lone-cloud Date: Fri, 6 Feb 2026 22:53:31 -0800 Subject: [PATCH] lets not UPX compress release binaries, dev release only for arm64 --- .github/workflows/release-dev.yml | 2 +- .github/workflows/release.yml | 8 +------- Dockerfile | 5 ++--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index d0f05e0..51248f1 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -26,6 +26,6 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true tags: ghcr.io/lone-cloud/prism:dev diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10e04d0..7fc1a29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,11 +23,6 @@ jobs: run: | echo "tag=$(cat VERSION)" >> $GITHUB_OUTPUT - - name: Install UPX - run: | - sudo apt-get update - sudo apt-get install -y upx-ucl - - name: Build binaries run: | VERSION=$(cat VERSION) @@ -37,14 +32,13 @@ jobs: CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \ -ldflags="-s -w -X main.version=$VERSION -X main.commit=$COMMIT" \ -o prism-linux-amd64 . - upx --best --lzma prism-linux-amd64 # Linux ARM64 + sudo apt-get update sudo apt-get install -y gcc-aarch64-linux-gnu CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build \ -ldflags="-s -w -X main.version=$VERSION -X main.commit=$COMMIT" \ -o prism-linux-arm64 . - upx --best --lzma prism-linux-arm64 - name: Create GitHub Release uses: softprops/action-gh-release@v2 diff --git a/Dockerfile b/Dockerfile index a0a0e9b..bf646d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.25-alpine3.23 AS builder WORKDIR /build -RUN apk add --no-cache git ca-certificates gcc musl-dev upx +RUN apk add --no-cache git ca-certificates gcc musl-dev COPY go.mod go.sum ./ RUN go mod download @@ -12,8 +12,7 @@ COPY . . RUN CGO_ENABLED=1 GOOS=linux go build \ -trimpath \ -ldflags="-w -s -X main.version=$(cat VERSION 2>/dev/null || echo dev) -X main.commit=$(git rev-parse --short HEAD 2>/dev/null || echo unknown)" \ - -o prism . && \ - upx --best --lzma prism + -o prism . FROM alpine:3.23