File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags : ['v*']
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ release :
12+ strategy :
13+ matrix :
14+ include :
15+ - os : macos-latest
16+ goos : darwin
17+ goarch : arm64
18+ ext : .tar.gz
19+ - os : windows-latest
20+ goos : windows
21+ goarch : amd64
22+ ext : .zip
23+ - os : ubuntu-22.04
24+ goos : linux
25+ goarch : amd64
26+ ext : .tar.gz
27+
28+ runs-on : ${{ matrix.os }}
29+
30+ steps :
31+ - uses : actions/checkout@v4
32+
33+ - uses : actions/setup-go@v5
34+ with :
35+ go-version : ' 1.25'
36+
37+ - name : Install Linux dependencies
38+ if : matrix.goos == 'linux'
39+ run : sudo apt-get update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev
40+
41+ - name : Setup Wails
42+ run : go install github.com/wailsapp/wails/v2/cmd/wails@latest
43+
44+ - name : Setup Node
45+ uses : actions/setup-node@v4
46+ with :
47+ node-version : ' 20'
48+
49+ - name : Build frontend
50+ run : cd frontend && npm ci && npm run build
51+
52+ - name : Go tests
53+ run : go test $(go list ./... | grep -v '/go-sd$') -count=1 -timeout 300s
54+
55+ - name : Go vet
56+ run : go vet ./...
57+
58+ - name : Build
59+ env :
60+ VERSION : ${{ github.ref_name }}
61+ run : wails build -ldflags "-X main.version=${VERSION#v}"
62+
63+ - name : Package (macOS)
64+ if : matrix.goos == 'darwin'
65+ run : tar czf sd-studio-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz -C build/bin sd-studio.app
66+
67+ - name : Package (Linux)
68+ if : matrix.goos == 'linux'
69+ run : tar czf sd-studio-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz -C build/bin sd-studio
70+
71+ - name : Package (Windows)
72+ if : matrix.ext == '.zip'
73+ shell : pwsh
74+ run : Compress-Archive -Path build/bin/sd-studio.exe -DestinationPath sd-studio-${{ matrix.goos }}-${{ matrix.goarch }}.zip
75+
76+ - name : Upload Release Assets
77+ uses : softprops/action-gh-release@v2
78+ with :
79+ files : |
80+ sd-studio-${{ matrix.goos }}-${{ matrix.goarch }}.*
You can’t perform that action at this time.
0 commit comments