From 0cae2407a975b1a95008e934c4015a4f83156336 Mon Sep 17 00:00:00 2001 From: Axel Meyer Date: Tue, 3 Mar 2026 21:20:11 +0100 Subject: [PATCH] Fix CI: remove CGO panel builds, match working pipeline pattern The act runner doesn't have CGO/MinGW available by default. Ship tray + setup binaries only (panel requires CGO cross-compile, deferred to later). Also move apt-get install to the step that needs it (zip). Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/release.yml | 12 +++--------- packaging/nfpm.yaml | 2 -- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1e36737..ba70eae 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -22,24 +22,17 @@ jobs: echo "/usr/local/go/bin" >> $GITHUB_PATH echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - name: Install build dependencies - run: | - apt-get update -qq - apt-get install -y -qq gcc g++ mingw-w64 zip libwebkit2gtk-4.0-dev >/dev/null 2>&1 - - name: Install nfpm run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest - name: Build Linux binaries run: | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o syncwarden ./cmd/syncwarden - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o syncwarden-panel ./cmd/panel CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o syncwarden-setup ./cmd/setup - name: Build Windows binaries run: | CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w -H=windowsgui" -o syncwarden.exe ./cmd/syncwarden - CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -trimpath -ldflags="-s -w -H=windowsgui" -o syncwarden-panel.exe ./cmd/panel CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o syncwarden-setup.exe ./cmd/setup - name: Build .deb package @@ -50,15 +43,16 @@ jobs: - name: Create Linux tarball run: | mkdir -p dist/syncwarden-${{ env.VERSION }} - cp syncwarden syncwarden-panel syncwarden-setup dist/syncwarden-${{ env.VERSION }}/ + cp syncwarden syncwarden-setup dist/syncwarden-${{ env.VERSION }}/ cp README.md CHANGELOG.md LICENSE dist/syncwarden-${{ env.VERSION }}/ cp packaging/linux/syncwarden.desktop dist/syncwarden-${{ env.VERSION }}/ tar -czf syncwarden_${{ env.VERSION }}_linux_amd64.tar.gz -C dist syncwarden-${{ env.VERSION }} - name: Create Windows zip run: | + apt-get update -qq && apt-get install -y -qq zip >/dev/null 2>&1 mkdir -p dist-win/syncwarden-${{ env.VERSION }} - cp syncwarden.exe syncwarden-panel.exe syncwarden-setup.exe dist-win/syncwarden-${{ env.VERSION }}/ + cp syncwarden.exe syncwarden-setup.exe dist-win/syncwarden-${{ env.VERSION }}/ cp README.md CHANGELOG.md LICENSE dist-win/syncwarden-${{ env.VERSION }}/ cd dist-win && zip -r ../syncwarden_${{ env.VERSION }}_windows_amd64.zip syncwarden-${{ env.VERSION }} diff --git a/packaging/nfpm.yaml b/packaging/nfpm.yaml index 07e1b66..84aa215 100644 --- a/packaging/nfpm.yaml +++ b/packaging/nfpm.yaml @@ -11,8 +11,6 @@ license: MIT contents: - src: ./syncwarden dst: /usr/bin/syncwarden - - src: ./syncwarden-panel - dst: /usr/bin/syncwarden-panel - src: ./packaging/linux/syncwarden.desktop dst: /etc/xdg/autostart/syncwarden.desktop type: config