Skip to content

Commit cb40eb5

Browse files
committed
feat: update build process to conditionally set LDFLAGS for Windows GUI support
1 parent cd7b128 commit cb40eb5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ jobs:
4747
GOOS: ${{ matrix.goos }}
4848
GOARCH: ${{ matrix.goarch }}
4949
CGO_ENABLED: 1
50-
run: go build -ldflags "-s -w" -o klip-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} ./cmd/klip
50+
run: |
51+
LDFLAGS="-s -w"
52+
if [ "${{ matrix.goos }}" = "windows" ]; then
53+
LDFLAGS="$LDFLAGS -H windowsgui"
54+
fi
55+
go build -ldflags "$LDFLAGS" -o klip-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} ./cmd/klip
5156
5257
- name: Package (Windows)
5358
if: matrix.goos == 'windows'

0 commit comments

Comments
 (0)