File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,14 +15,26 @@ jobs:
1515 strategy :
1616 matrix :
1717 include :
18- - os : macos-latest
18+ - os : macos-13
1919 GOOS : darwin
2020 GOARCH : amd64
2121 target : darwin-amd64
22- - os : macos-latest
22+ ext : " "
23+ - os : macos-14
2324 GOOS : darwin
2425 GOARCH : arm64
2526 target : darwin-arm64
27+ ext : " "
28+ - os : ubuntu-latest
29+ GOOS : linux
30+ GOARCH : amd64
31+ target : linux-amd64
32+ ext : " "
33+ - os : windows-latest
34+ GOOS : windows
35+ GOARCH : amd64
36+ target : windows-amd64
37+ ext : " .exe"
2638
2739 steps :
2840 - name : Checkout code
4355 working-directory : web
4456 run : npm run build
4557
58+ - name : Install GUI dependencies (Linux)
59+ if : matrix.GOOS == 'linux'
60+ run : |
61+ sudo apt-get update
62+ sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev
63+
4664 - name : Set up Go
4765 uses : actions/setup-go@v4
4866 with :
@@ -56,14 +74,15 @@ jobs:
5674 shell : bash
5775 run : |
5876 mkdir -p dist
59- GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -o "dist/xcstrings-translator-${{ matrix.target }}${{ matrix.ext }}" .
60- chmod +x "dist/xcstrings-translator-${{ matrix.target }}${{ matrix.ext }}"
77+ GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -ldflags="${LDFLAGS}" -o "dist/xcstrings-translator-${{ matrix.target }}${{ matrix.ext }}" .
78+ CGO_ENABLED=1 GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -tags gui -ldflags="${LDFLAGS}" -o "dist/xcstrings-translator-${{ matrix.target }}-gui${{ matrix.ext }}" .
79+ chmod +x dist/*
6180
6281 - name : Package as ZIP
6382 shell : bash
6483 run : |
6584 cd dist
66- zip "xcstrings-translator-${{ matrix.target }}.zip" "xcstrings-translator-${{ matrix.target }}${{ matrix.ext }}"
85+ zip "xcstrings-translator-${{ matrix.target }}.zip" "xcstrings-translator-${{ matrix.target }}${{ matrix.ext }}" "xcstrings-translator-${{ matrix.target }}-gui${{ matrix.ext }}"
6786
6887 - name : Upload artifacts
6988 uses : actions/upload-artifact@v4
You can’t perform that action at this time.
0 commit comments