Skip to content

Commit d509b18

Browse files
committed
update workflow
1 parent 0bb3649 commit d509b18

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff 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
@@ -43,6 +55,12 @@ jobs:
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

0 commit comments

Comments
 (0)