From a6d726b227a6fb6b222c0bbb6b255811aab934f7 Mon Sep 17 00:00:00 2001 From: RonniSkansing Date: Fri, 2 Oct 2026 00:26:26 +0200 Subject: [PATCH] fix strip debug for production build Signed-off-by: RonniSkansing --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 277b66cf..0378ea91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,7 +69,7 @@ jobs: -w /app/backend \ golang@sha256:f86f1a6701e3dcc445fec097a42f78b758f15950ccf032c2d3e54e2754d32fdb `# golang:1.27.1-alpine linux/amd64` \ sh -c "apk add --no-cache gcc musl-dev && go build -trimpath \ - -ldflags='-X github.com/phishingclub/phishingclub/version.hash=ph${{ steps.get_version.outputs.HASH }} -X github.com/phishingclub/phishingclub/version.version=${{ steps.get_version.outputs.VERSION }} -linkmode=external -extldflags=-static' \ + -ldflags='-s -w -X github.com/phishingclub/phishingclub/version.hash=ph${{ steps.get_version.outputs.HASH }} -X github.com/phishingclub/phishingclub/version.version=${{ steps.get_version.outputs.VERSION }} -linkmode=external -extldflags=-static' \ -tags production -o ../build/amd64/phishingclub main.go" # build arm64 binary — run natively under QEMU (already set up above) @@ -80,7 +80,7 @@ jobs: -w /app/backend \ golang@sha256:df4c4a0eeb85873e0122c6e2eb1b436f3131576f572505c1ea61954b00fa6460 `# golang:1.27.1-alpine linux/arm64` \ sh -c "apk add --no-cache gcc musl-dev && go build -trimpath \ - -ldflags='-X github.com/phishingclub/phishingclub/version.hash=ph${{ steps.get_version.outputs.HASH }} -X github.com/phishingclub/phishingclub/version.version=${{ steps.get_version.outputs.VERSION }} -linkmode=external -extldflags=-static' \ + -ldflags='-s -w -X github.com/phishingclub/phishingclub/version.hash=ph${{ steps.get_version.outputs.HASH }} -X github.com/phishingclub/phishingclub/version.version=${{ steps.get_version.outputs.VERSION }} -linkmode=external -extldflags=-static' \ -tags production -o ../build/arm64/phishingclub main.go" - name: Fix build directory permissions