@@ -16,34 +16,48 @@ jobs:
1616 runs-on : ${{ matrix.platform }}
1717
1818 steps :
19- - uses : actions/checkout@v2
19+ - uses : actions/checkout@v4
20+
2021 - name : setup node
21- uses : actions/setup-node@v1
22+ uses : actions/setup-node@v4
2223 with :
23- node-version : 16
24+ node-version : lts/*
25+ cache : ' yarn'
26+
2427 - name : install Rust
25- uses : actions-rs/ toolchain@v1
28+ uses : dtolnay/rust- toolchain@stable
2629 with :
2730 toolchain : nightly-2024-05-04 # 1.80.0-nightly (e82c861d7 2024-05-04)
28- target : wasm32-unknown-unknown
29- default : true
31+ targets : wasm32-unknown-unknown,${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
32+
3033 - name : install Tauri cli
3134 run : cargo install tauri-cli
35+
3236 - name : install Tailwind CSS
3337 run : npm i -g tailwindcss
38+
3439 - name : generate Tailwind CSS
3540 run : npx tailwindcss -i ./input.css -o ./style/output.css
41+
3642 - uses : jetli/trunk-action@v0.1.0
3743 with :
3844 # Optional version of trunk to install(eg. 'v0.8.1', 'latest')
3945 version : " latest"
46+
4047 - name : install dependencies (ubuntu only)
4148 if : matrix.platform == 'ubuntu-22.04'
4249 run : |
4350 sudo apt-get update
4451 sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
52+
53+ - name : Rust cache
54+ uses : swatinem/rust-cache@v2
55+ with :
56+ workspaces : ' ./src-tauri -> target'
57+
4558 - name : build in release mode
4659 run : cargo tauri build
60+
4761 - uses : tauri-apps/tauri-action@v0
4862 env :
4963 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments