1+ name : Build WinBoat
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - ' v*'
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ if : github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : ' 22'
22+ cache : ' npm'
23+
24+ - name : Set up Go
25+ uses : actions/setup-go@v5
26+ with :
27+ go-version : ' >=1.24.2'
28+
29+ - name : Install Flatpak dependencies
30+ run : |
31+ sudo apt-get update
32+ sudo apt-get install -y flatpak flatpak-builder
33+ flatpak install -y flathub org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08
34+
35+ - name : Install dependencies
36+ run : npm ci
37+
38+ - name : Build guest server and app
39+ run : npm run build:linux
40+
41+ - name : Upload artifacts
42+ uses : actions/upload-artifact@v4
43+ with :
44+ name : linux-artifacts
45+ path : dist/*
46+
47+ release :
48+ runs-on : ubuntu-latest
49+ if : startsWith(github.ref, 'refs/tags/')
50+ steps :
51+ - name : Checkout code
52+ uses : actions/checkout@v4
53+
54+ - name : Set up Node.js
55+ uses : actions/setup-node@v4
56+ with :
57+ node-version : ' 20'
58+ cache : ' npm'
59+
60+ - name : Set up Go
61+ uses : actions/setup-go@v5
62+ with :
63+ go-version : ' >=1.22.0'
64+
65+ - name : Install Flatpak dependencies
66+ run : |
67+ sudo apt-get update
68+ sudo apt-get install -y flatpak flatpak-builder
69+ flatpak install -y flathub org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08
70+
71+ - name : Install dependencies
72+ run : npm ci
73+
74+ - name : Build guest server and app
75+ run : npm run build:linux
76+ env :
77+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
78+
79+ - name : Upload artifacts
80+ uses : actions/upload-artifact@v4
81+ with :
82+ name : linux-release-artifacts
83+ path : dist/*
0 commit comments