-
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (50 loc) · 1.57 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Build the application
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository code
uses: actions/checkout@v3
# Cache Rust
- uses: actions/cache@v3
with:
path: ./src-tauri/target
key: ${{matrix.os}}-${{ hashFiles('./src-tauri/Cargo.lock') }}
# Cache Rust
- uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{matrix.os}}-${{ hashFiles('./src-tauri/Cargo.lock') }}
# Cache Node
- uses: actions/cache@v3
with:
path: ./node_modules
key: ${{matrix.os}}-${{ hashFiles('./package-lock.json') }}
# Cache Next.js
- uses: actions/cache@v3
with:
path: ./src-next/.next
key: ${{matrix.os}}
- name: Install Node.js v20 LTS
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install Rust with Clippy
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install Tauri dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt install libdbus-1-dev libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install node dependencies
run: npm install
- name: Build application
run: npm run tauri build