Skip to content

Commit 0a35964

Browse files
committed
ci: migrate all workflows from Wails v2 to v3
- pr.yml: task + wails3 for builds and E2E (server mode on Linux) - nightly.yaml: task + wails3 for all 3 platform builds, Go 1.24→1.26 - release.yaml: task + wails3 for all 3 platform builds - All: output paths updated from build/bin/ to bin/ - All: wails build replaced with task common:build:frontend + go build
1 parent 814ef25 commit 0a35964

3 files changed

Lines changed: 150 additions & 117 deletions

File tree

.github/workflows/nightly.yaml

Lines changed: 52 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
env:
1616
NODE_OPTIONS: "--max-old-space-size=4096"
17-
GO_VERSION: "1.24"
17+
GO_VERSION: "1.26"
1818
NODE_VERSION: "20"
1919
PNPM_VERSION: "10"
2020

@@ -89,27 +89,31 @@ jobs:
8989
cache: true
9090
cache-dependency-path: "go.sum"
9191

92-
- name: Install Wails
92+
- name: Install Task
93+
uses: arduino/setup-task@v2
94+
with:
95+
version: 3.x
96+
97+
- name: Install Wails v3
9398
shell: bash
94-
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
99+
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
95100

96-
- name: Build runtime package
101+
- name: Build frontend
97102
shell: bash
98-
run: pnpm run build
99-
working-directory: packages/omniviewdev-runtime
103+
run: task common:build:frontend
100104

101105
- name: Build Omniview
102106
shell: bash
103107
run: |
104-
wails build -platform darwin/universal \
105-
-webview2 download \
106-
-ldflags "\
108+
go build -tags production -trimpath -buildvcs=false \
109+
-ldflags "-w -s \
107110
-X github.com/omniviewdev/omniview/internal/version.Version=${{ needs.check-changes.outputs.nightly_version }} \
108111
-X github.com/omniviewdev/omniview/internal/version.GitCommit=${{ github.sha }} \
109112
-X github.com/omniviewdev/omniview/internal/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
110113
-X github.com/omniviewdev/omniview/internal/version.Development=true \
111114
-X github.com/omniviewdev/omniview/internal/telemetry.buildOTLPEndpoint=${{ secrets.TELEMETRY_OTLP_ENDPOINT }} \
112-
-X github.com/omniviewdev/omniview/internal/telemetry.buildPyroscopeEndpoint=${{ secrets.TELEMETRY_PYROSCOPE_ENDPOINT }}"
115+
-X github.com/omniviewdev/omniview/internal/telemetry.buildPyroscopeEndpoint=${{ secrets.TELEMETRY_PYROSCOPE_ENDPOINT }}" \
116+
-o bin/Omniview .
113117
114118
- name: Import Code-Signing Certificates
115119
uses: Apple-Actions/import-codesign-certs@v3
@@ -129,17 +133,17 @@ jobs:
129133
--options runtime \
130134
--entitlements build/darwin/entitlements.plist \
131135
--sign "$APPLE_SIGN_ID" \
132-
build/bin/Omniview.app
136+
bin/Omniview
133137
134-
ditto -c -k --keepParent --rsrc build/bin/Omniview.app archive.zip
138+
ditto -c -k --keepParent bin/Omniview archive.zip
135139
136140
xcrun notarytool submit archive.zip \
137141
--apple-id "$NOTARY_USER" \
138142
--password "$NOTARY_PWD" \
139143
--team-id "$TEAM_ID" \
140144
--wait
141145
142-
xcrun stapler staple build/bin/Omniview.app
146+
xcrun stapler staple bin/Omniview
143147
144148
- name: Checkout create-dmg
145149
uses: actions/checkout@v4
@@ -153,25 +157,23 @@ jobs:
153157
working-directory: ./build
154158
run: |
155159
VERSION="${{ needs.check-changes.outputs.nightly_version }}"
156-
./create-dmg/create-dmg \
160+
../build/create-dmg/create-dmg \
157161
--no-internet-enable \
158162
--volname "Omniview Nightly" \
159-
--volicon "bin/Omniview.app/Contents/Resources/iconfile.icns" \
160163
--text-size 12 \
161164
--window-pos 400 400 \
162165
--window-size 660 450 \
163166
--icon-size 80 \
164-
--icon "Omniview.app" 180 180 \
165-
--hide-extension "Omniview.app" \
167+
--icon "Omniview" 180 180 \
166168
--app-drop-link 480 180 \
167-
"bin/Omniview_${VERSION}_darwin_universal.dmg" \
168-
"bin"
169+
"../bin/Omniview_${VERSION}_darwin_universal.dmg" \
170+
"../bin"
169171
170172
- name: Upload artifact
171173
uses: actions/upload-artifact@v4
172174
with:
173175
name: nightly-macos-dmg
174-
path: build/bin/Omniview_${{ needs.check-changes.outputs.nightly_version }}_darwin_universal.dmg
176+
path: bin/Omniview_${{ needs.check-changes.outputs.nightly_version }}_darwin_universal.dmg
175177
if-no-files-found: error
176178
retention-days: 1
177179

@@ -213,35 +215,38 @@ jobs:
213215
cache: true
214216
cache-dependency-path: "go.sum"
215217

216-
- name: Install Wails
217-
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
218+
- name: Install Task
219+
uses: arduino/setup-task@v2
220+
with:
221+
version: 3.x
222+
223+
- name: Install Wails v3
224+
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
218225

219-
- name: Build runtime package
220-
run: pnpm run build
221-
working-directory: packages/omniviewdev-runtime
226+
- name: Build frontend
227+
run: task common:build:frontend
222228

223229
- name: Build Omniview
224230
run: |
225-
wails build -platform linux/amd64 \
226-
-tags webkit2_41 \
227-
-webview2 download \
228-
-ldflags "\
231+
go build -tags "production,webkit2_41" -trimpath -buildvcs=false \
232+
-ldflags "-w -s \
229233
-X github.com/omniviewdev/omniview/internal/version.Version=${{ needs.check-changes.outputs.nightly_version }} \
230234
-X github.com/omniviewdev/omniview/internal/version.GitCommit=${{ github.sha }} \
231235
-X github.com/omniviewdev/omniview/internal/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
232236
-X github.com/omniviewdev/omniview/internal/version.Development=true \
233237
-X github.com/omniviewdev/omniview/internal/telemetry.buildOTLPEndpoint=${{ secrets.TELEMETRY_OTLP_ENDPOINT }} \
234-
-X github.com/omniviewdev/omniview/internal/telemetry.buildPyroscopeEndpoint=${{ secrets.TELEMETRY_PYROSCOPE_ENDPOINT }}"
238+
-X github.com/omniviewdev/omniview/internal/telemetry.buildPyroscopeEndpoint=${{ secrets.TELEMETRY_PYROSCOPE_ENDPOINT }}" \
239+
-o bin/Omniview .
235240
236241
- name: Rename executable
237-
working-directory: ./build/bin
242+
working-directory: ./bin
238243
run: mv Omniview "Omniview_${{ needs.check-changes.outputs.nightly_version }}_linux_amd64"
239244

240245
- name: Upload artifact
241246
uses: actions/upload-artifact@v4
242247
with:
243248
name: nightly-linux-binary
244-
path: build/bin/Omniview_${{ needs.check-changes.outputs.nightly_version }}_linux_amd64
249+
path: bin/Omniview_${{ needs.check-changes.outputs.nightly_version }}_linux_amd64
245250
if-no-files-found: error
246251
retention-days: 1
247252

@@ -278,37 +283,41 @@ jobs:
278283
cache: true
279284
cache-dependency-path: "go.sum"
280285

281-
- name: Install Wails
286+
- name: Install Task
287+
uses: arduino/setup-task@v2
288+
with:
289+
version: 3.x
290+
291+
- name: Install Wails v3
282292
shell: bash
283-
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
293+
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
284294

285-
- name: Build runtime package
295+
- name: Build frontend
286296
shell: bash
287-
run: pnpm run build
288-
working-directory: packages/omniviewdev-runtime
297+
run: task common:build:frontend
289298

290299
- name: Build Omniview
291300
shell: bash
292301
run: |
293-
wails build -platform windows/amd64 \
294-
-webview2 download \
295-
-ldflags "\
302+
go build -tags production -trimpath -buildvcs=false \
303+
-ldflags "-w -s -H windowsgui \
296304
-X github.com/omniviewdev/omniview/internal/version.Version=${{ needs.check-changes.outputs.nightly_version }} \
297305
-X github.com/omniviewdev/omniview/internal/version.GitCommit=${{ github.sha }} \
298306
-X github.com/omniviewdev/omniview/internal/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
299307
-X github.com/omniviewdev/omniview/internal/version.Development=true \
300308
-X github.com/omniviewdev/omniview/internal/telemetry.buildOTLPEndpoint=${{ secrets.TELEMETRY_OTLP_ENDPOINT }} \
301-
-X github.com/omniviewdev/omniview/internal/telemetry.buildPyroscopeEndpoint=${{ secrets.TELEMETRY_PYROSCOPE_ENDPOINT }}"
309+
-X github.com/omniviewdev/omniview/internal/telemetry.buildPyroscopeEndpoint=${{ secrets.TELEMETRY_PYROSCOPE_ENDPOINT }}" \
310+
-o bin/Omniview.exe .
302311
303312
- name: Rename executable
304-
working-directory: ./build/bin
313+
working-directory: ./bin
305314
run: Rename-Item -Path "Omniview.exe" -NewName "Omniview_${{ needs.check-changes.outputs.nightly_version }}_windows_amd64.exe"
306315

307316
- name: Upload artifact
308317
uses: actions/upload-artifact@v4
309318
with:
310319
name: nightly-windows-binary
311-
path: build/bin/Omniview_${{ needs.check-changes.outputs.nightly_version }}_windows_amd64.exe
320+
path: bin/Omniview_${{ needs.check-changes.outputs.nightly_version }}_windows_amd64.exe
312321
if-no-files-found: error
313322
retention-days: 1
314323

.github/workflows/pr.yml

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
1818
# ─────────────────────────────────────────────────────────────────────────────
19-
# E2E Tests — Playwright against wails dev
19+
# E2E Tests — Playwright against server mode
2020
# ─────────────────────────────────────────────────────────────────────────────
2121
e2e-tests:
2222
runs-on: ubuntu-latest
@@ -52,29 +52,34 @@ jobs:
5252
cache: true
5353
cache-dependency-path: "go.sum"
5454

55-
- name: Install Wails
56-
run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.11.0
55+
- name: Install Task
56+
uses: arduino/setup-task@v2
57+
with:
58+
version: 3.x
59+
60+
- name: Install Wails v3
61+
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
5762

5863
- name: Build workspace packages
59-
run: make packages
64+
run: task packages
6065

6166
- name: Install Playwright browsers
6267
working-directory: e2e
6368
run: pnpm exec playwright install --with-deps chromium
6469

65-
- name: Start wails dev
70+
- name: Build and start server mode
6671
run: |
67-
xvfb-run wails dev -loglevel Error -tags webkit2_41 -nosyncgomod -m -noreload -skipbindings &
68-
echo "Waiting for Wails dev server..."
69-
for i in $(seq 1 150); do
70-
if curl -sf http://localhost:34115 > /dev/null 2>&1; then
71-
echo "Wails dev server is ready (${i}s)"
72-
exit 0
72+
task common:build:frontend
73+
go build -tags server -o bin/Omniview-server .
74+
bin/Omniview-server &
75+
echo "Waiting for server to be ready..."
76+
for i in $(seq 1 60); do
77+
if curl -sf http://localhost:34115/health > /dev/null 2>&1; then
78+
echo "Server ready"
79+
break
7380
fi
7481
sleep 2
7582
done
76-
echo "Timed out waiting for Wails dev server"
77-
exit 1
7883
7984
- name: Run Playwright tests
8085
working-directory: e2e
@@ -101,15 +106,18 @@ jobs:
101106
- os: macos-latest
102107
platform: darwin/universal
103108
artifact-name: pr-build-macos
104-
extra-flags: ""
109+
build-tags: "production"
110+
extra-ldflags: ""
105111
- os: ubuntu-latest
106112
platform: linux/amd64
107113
artifact-name: pr-build-linux
108-
extra-flags: "-tags webkit2_41"
114+
build-tags: "production,webkit2_41"
115+
extra-ldflags: ""
109116
- os: windows-latest
110117
platform: windows/amd64
111118
artifact-name: pr-build-windows
112-
extra-flags: ""
119+
build-tags: "production"
120+
extra-ldflags: "-H windowsgui"
113121
runs-on: ${{ matrix.os }}
114122
timeout-minutes: 30
115123
steps:
@@ -144,48 +152,56 @@ jobs:
144152
cache: true
145153
cache-dependency-path: "go.sum"
146154

147-
- name: Install Wails
155+
- name: Install Task
156+
uses: arduino/setup-task@v2
157+
with:
158+
version: 3.x
159+
160+
- name: Install Wails v3
148161
shell: bash
149-
run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.11.0
162+
run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
150163

151164
- name: Build workspace packages
152165
shell: bash
153-
run: make packages
166+
run: task packages
167+
168+
- name: Build frontend
169+
shell: bash
170+
run: task common:build:frontend
154171

155172
- name: Build Omniview
156173
shell: bash
157174
run: |
158-
wails build -platform ${{ matrix.platform }} \
159-
${{ matrix.extra-flags }} \
160-
-webview2 download \
161-
-ldflags "\
175+
go build -tags "${{ matrix.build-tags }}" -trimpath -buildvcs=false \
176+
-ldflags "-w -s ${{ matrix.extra-ldflags }} \
162177
-X github.com/omniviewdev/omniview/internal/version.Version=0.0.0-pr.${{ github.event.pull_request.number }} \
163178
-X github.com/omniviewdev/omniview/internal/version.GitCommit=${{ github.sha }} \
164179
-X github.com/omniviewdev/omniview/internal/version.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
165-
-X github.com/omniviewdev/omniview/internal/version.Development=true"
180+
-X github.com/omniviewdev/omniview/internal/version.Development=true" \
181+
-o bin/Omniview .
166182
167183
- name: Prepare artifact (macOS)
168184
if: runner.os == 'macOS'
169185
run: |
170-
cd build/bin
171-
zip -r Omniview-pr${{ github.event.pull_request.number }}-macos.zip Omniview.app
186+
cd bin
187+
zip -r Omniview-pr${{ github.event.pull_request.number }}-macos.zip Omniview
172188
173189
- name: Prepare artifact (Linux)
174190
if: runner.os == 'Linux'
175-
working-directory: build/bin
191+
working-directory: bin
176192
run: mv Omniview "Omniview-pr${{ github.event.pull_request.number }}-linux-amd64"
177193

178194
- name: Prepare artifact (Windows)
179195
if: runner.os == 'Windows'
180-
working-directory: build/bin
181-
run: Rename-Item -Path "Omniview.exe" -NewName "Omniview-pr${{ github.event.pull_request.number }}-windows-amd64.exe"
196+
working-directory: bin
197+
run: Rename-Item -Path "Omniview" -NewName "Omniview-pr${{ github.event.pull_request.number }}-windows-amd64.exe"
182198

183199
- name: Upload artifact
184200
uses: actions/upload-artifact@v4
185201
with:
186202
name: ${{ matrix.artifact-name }}
187203
path: |
188-
build/bin/*.zip
189-
build/bin/Omniview-pr*
204+
bin/*.zip
205+
bin/Omniview-pr*
190206
if-no-files-found: error
191207
retention-days: 5

0 commit comments

Comments
 (0)