88permissions :
99 contents : write
1010
11- env :
12- GO_VERSION : ' 1.23'
13- NODE_VERSION : ' 20'
14-
1511jobs :
16- build-windows :
17- runs-on : windows-latest
18- steps :
19- - uses : actions/checkout@v4
20-
21- - name : Set up Go
22- uses : actions/setup-go@v5
23- with :
24- go-version : ${{ env.GO_VERSION }}
25- cache : true
26-
27- - name : Set up Node
28- uses : actions/setup-node@v4
29- with :
30- node-version : ${{ env.NODE_VERSION }}
31- cache : ' npm'
32- cache-dependency-path : frontend/package.json
33-
34- - name : Install Wails
35- run : go install github.com/wailsapp/wails/v2/cmd/wails@latest
36-
37- - name : Build Windows App
38- run : |
39- wails build -nsis -ldflags "-X 'llm-desk/internal/version.Version=${{ github.ref_name }}' -X 'llm-desk/internal/version.Commit=${{ github.sha }}'"
40-
41- - name : Rename artifacts
42- shell : pwsh
43- run : |
44- $version = "${{ github.ref_name }}"
45- Move-Item -Path "build/bin/llm-desk.exe" -Destination "build/bin/LLM-Desk-$version-windows-amd64.exe" -ErrorAction SilentlyContinue
46- Move-Item -Path "build/bin/llm-desk-amd64-installer.exe" -Destination "build/bin/LLM-Desk-$version-windows-amd64-installer.exe" -ErrorAction SilentlyContinue
47-
48- - name : Upload Windows artifacts
49- uses : actions/upload-artifact@v4
50- with :
51- name : windows-artifacts
52- path : build/bin/*.exe
53- retention-days : 1
54-
55- build-macos :
56- runs-on : macos-latest
12+ build :
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ build :
17+ - {name: LLM-Desk, platform: linux/amd64, os: ubuntu-latest}
18+ - {name: LLM-Desk, platform: windows/amd64, os: windows-latest}
19+ - {name: LLM-Desk, platform: darwin/universal, os: macos-latest}
20+ runs-on : ${{ matrix.build.os }}
5721 steps :
58- - uses : actions/checkout@v4
59-
60- - name : Set up Go
61- uses : actions/setup-go@v5
62- with :
63- go-version : ${{ env.GO_VERSION }}
64- cache : true
65-
66- - name : Set up Node
67- uses : actions/setup-node@v4
22+ - name : Checkout
23+ uses : actions/checkout@v4
6824 with :
69- node-version : ${{ env.NODE_VERSION }}
70- cache : ' npm'
71- cache-dependency-path : frontend/package.json
72-
73- - name : Install Wails
74- run : go install github.com/wailsapp/wails/v2/cmd/wails@latest
75-
76- - name : Build macOS App (Universal Binary)
77- run : |
78- wails build -platform darwin/universal -ldflags "-X 'llm-desk/internal/version.Version=${{ github.ref_name }}' -X 'llm-desk/internal/version.Commit=${{ github.sha }}'"
79-
80- - name : Create DMG
81- run : |
82- version="${{ github.ref_name }}"
83- # Create a zip of the app bundle
84- cd build/bin
85- # Find the .app directory
86- app_name=$(ls -d *.app 2>/dev/null | head -1)
87- if [ -n "$app_name" ]; then
88- zip -r "LLM-Desk-${version}-darwin-universal.zip" "$app_name"
89- else
90- # If no .app, compress binaries
91- zip -r "LLM-Desk-${version}-darwin-universal.zip" *
92- fi
93-
94- - name : Upload macOS artifacts
95- uses : actions/upload-artifact@v4
96- with :
97- name : macos-artifacts
98- path : build/bin/*.zip
99- retention-days : 1
100-
101- build-linux :
102- runs-on : ubuntu-latest
103- steps :
104- - uses : actions/checkout@v4
25+ submodules : recursive
10526
10627 - name : Install Linux Dependencies
28+ if : runner.os == 'Linux'
10729 run : |
10830 sudo apt-get update
10931 sudo apt-get install -y \
@@ -113,59 +35,14 @@ jobs:
11335 libayatana-appindicator3-dev \
11436 librsvg2-dev
11537
116- - name : Set up Go
117- uses : actions/setup-go@v5
118- with :
119- go-version : ${{ env.GO_VERSION }}
120- cache : true
121-
122- - name : Set up Node
123- uses : actions/setup-node@v4
124- with :
125- node-version : ${{ env.NODE_VERSION }}
126- cache : ' npm'
127- cache-dependency-path : frontend/package.json
128-
129- - name : Install Wails
130- run : go install github.com/wailsapp/wails/v2/cmd/wails@latest
131-
132- - name : Build Linux App
133- run : |
134- wails build -ldflags "-X 'llm-desk/internal/version.Version=${{ github.ref_name }}' -X 'llm-desk/internal/version.Commit=${{ github.sha }}'"
135-
136- - name : Rename artifacts
137- run : |
138- version="${{ github.ref_name }}"
139- mv build/bin/llm-desk "build/bin/LLM-Desk-${version}-linux-amd64"
140-
141- - name : Upload Linux artifacts
142- uses : actions/upload-artifact@v4
143- with :
144- name : linux-artifacts
145- path : build/bin/LLM-Desk-*
146- retention-days : 1
147-
148- release :
149- needs : [build-windows, build-macos, build-linux]
150- runs-on : ubuntu-latest
151- steps :
152- - uses : actions/checkout@v4
153-
154- - name : Download all artifacts
155- uses : actions/download-artifact@v4
156- with :
157- path : release-artifacts
158-
159- - name : Display artifacts
160- run : |
161- echo "Downloaded artifacts:"
162- find release-artifacts -type f -exec ls -la {} \;
163-
164- - name : Create GitHub Release
165- uses : softprops/action-gh-release@v2
38+ - name : Build Wails App
39+ uses : dAppServer/wails-build-action@v3
16640 with :
167- generate_release_notes : true
168- files : |
169- release-artifacts/**/*
41+ build-name : ${{ matrix.build.name }}
42+ build-platform : ${{ matrix.build.platform }}
43+ go-version : ' 1.23'
44+ node-version : ' 20'
45+ build-tags : webkit2_41
46+ nsis : true
17047 env :
17148 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments