Skip to content

Commit 0a89299

Browse files
committed
ci: create build workflow
1 parent 7f37222 commit 0a89299

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/build.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
8+
9+
jobs:
10+
release:
11+
permissions:
12+
contents: write
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- platform: 'macos-latest'
18+
- platform: 'ubuntu-22.04'
19+
- platform: 'ubuntu-22.04-arm' # for Arm based linux.
20+
- platform: 'windows-latest'
21+
runs-on: ${{ matrix.platform }}
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Install dependencies (ubuntu only)
28+
if: matrix.platform == 'ubuntu-22.04'
29+
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev \
33+
libjavascriptcoregtk-4.1-dev libsoup-3.0-dev
34+
35+
- name: Install dependencies (ubuntu-arm only)
36+
if: matrix.platform == 'ubuntu-22.04-arm'
37+
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libgtk-3-dev xdg-utils
41+
42+
- name: Rust setup
43+
uses: dtolnay/rust-toolchain@stable
44+
45+
- name: Rust cache
46+
uses: swatinem/rust-cache@v2
47+
with:
48+
workspaces: './src-tauri -> target'
49+
50+
- name: Sync node version and setup cache
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: 'lts/*'
54+
cache: 'npm'
55+
56+
- name: Install node dependencies
57+
run: npm install
58+
59+
- name: Prebuild
60+
run: make prebuild
61+
62+
- name: Build the app
63+
uses: tauri-apps/tauri-action@v0
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
with:
67+
args: ${{ matrix.args }}

0 commit comments

Comments
 (0)