Skip to content

Commit b49a6e3

Browse files
committed
ci(desktop): add desktop-release workflow + README
Triggered on desktop-v* tags. Builds macos-universal .app and windows-amd64 .exe via wails build on matching runners, archives them, and attaches the zips to a generated GitHub release. Linux deferred — needs gtk/webkit2gtk system deps on the runner; can be added later when there's demand. Pinned Go 1.24 in CI because Go 1.23 on Darwin Sequoia/Tahoe produces binaries missing LC_UUID, which the new dyld rejects.
1 parent 8e6bc7e commit b49a6e3

1 file changed

Lines changed: 93 additions & 0 deletions

File tree

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Desktop Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'desktop-v*'
7+
8+
# Serialize so two tag pushes can't race the same GitHub release.
9+
concurrency:
10+
group: desktop-release-${{ github.ref }}
11+
cancel-in-progress: false
12+
13+
jobs:
14+
build:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- os: macos-latest
20+
platform: darwin/universal
21+
artifact_name: csvops-desktop-macos-universal
22+
artifact_glob: 'desktop/build/bin/*.app'
23+
archive_cmd: 'cd desktop/build/bin && zip -r ../../../csvops-desktop-macos-universal.zip *.app'
24+
archive_path: csvops-desktop-macos-universal.zip
25+
- os: windows-latest
26+
platform: windows/amd64
27+
artifact_name: csvops-desktop-windows-amd64
28+
artifact_glob: 'desktop/build/bin/*.exe'
29+
archive_cmd: 'powershell Compress-Archive -Path desktop/build/bin/*.exe -DestinationPath csvops-desktop-windows-amd64.zip'
30+
archive_path: csvops-desktop-windows-amd64.zip
31+
runs-on: ${{ matrix.os }}
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
38+
- uses: actions/setup-go@v5
39+
with:
40+
# The desktop module pins go 1.23 in its go.mod but Wails needs the
41+
# Darwin LC_UUID fix from Go 1.24+; pin explicitly here.
42+
go-version: '1.24'
43+
44+
- uses: actions/setup-node@v4
45+
with:
46+
node-version: '20'
47+
48+
- name: Install Wails
49+
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
50+
shell: bash
51+
52+
- name: Add GOPATH/bin to PATH (unix)
53+
if: runner.os != 'Windows'
54+
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
55+
shell: bash
56+
57+
- name: Add GOPATH/bin to PATH (windows)
58+
if: runner.os == 'Windows'
59+
run: echo "$(go env GOPATH)\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
60+
shell: pwsh
61+
62+
- name: Build
63+
working-directory: desktop
64+
run: wails build -platform ${{ matrix.platform }} -clean
65+
shell: bash
66+
67+
- name: Archive
68+
run: ${{ matrix.archive_cmd }}
69+
shell: bash
70+
71+
- name: Upload artifact
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: ${{ matrix.artifact_name }}
75+
path: ${{ matrix.archive_path }}
76+
77+
release:
78+
needs: build
79+
runs-on: ubuntu-latest
80+
permissions:
81+
contents: write
82+
steps:
83+
- uses: actions/download-artifact@v4
84+
with:
85+
path: dist
86+
merge-multiple: true
87+
88+
- name: Create GitHub release
89+
uses: softprops/action-gh-release@v2
90+
with:
91+
files: dist/*
92+
name: ${{ github.ref_name }}
93+
generate_release_notes: true

0 commit comments

Comments
 (0)