Skip to content

Commit 3e1d055

Browse files
committed
ci: build
1 parent 08160a8 commit 3e1d055

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/build.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
paths-ignore:
8+
- "README.md"
9+
10+
pull_request:
11+
branches:
12+
- "**"
13+
paths-ignore:
14+
- "README.md"
15+
16+
workflow_dispatch:
17+
18+
jobs:
19+
ubuntu:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6
25+
26+
- name: Install Linux Dependencies
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
30+
31+
- name: Setup Go
32+
uses: actions/setup-go@v6
33+
with:
34+
go-version: 'stable'
35+
36+
- name: Install Dependencies
37+
run: |
38+
go mod tidy
39+
40+
- name: Cache Wails CLI
41+
id: cache-wails
42+
uses: actions/cache@v4
43+
with:
44+
path: ~/go/bin/wails
45+
key: ${{ runner.os }}-wails-cli-v2
46+
47+
- name: Install wails
48+
if: steps.cache-wails.outputs.cache-hit != 'true'
49+
run: |
50+
go install github.com/wailsapp/wails/v2/cmd/wails@latest
51+
52+
- uses: pnpm/action-setup@v4
53+
name: Install pnpm
54+
with:
55+
version: 10
56+
run_install: false
57+
58+
- name: Install Node.js
59+
uses: actions/setup-node@v6
60+
with:
61+
node-version: 20
62+
cache: 'pnpm'
63+
cache-dependency-path: './frontend/pnpm-lock.yaml'
64+
65+
- name: Install frontend dependencies
66+
run: |
67+
cd frontend
68+
pnpm install --frozen-lockfile
69+
70+
- name: Build wails app
71+
run: |
72+
wails build -tags webkit2_41
73+
74+
- name: Upload Artifact
75+
uses: actions/upload-artifact@v5
76+
with:
77+
name: wails-app-linux-amd64
78+
path: build/bin/
79+
if-no-files-found: error

0 commit comments

Comments
 (0)