1+ name : ' publish'
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - release
8+
9+ jobs :
10+ publish-tauri :
11+ permissions :
12+ contents : write
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ include :
17+ - platform : ' macos-latest' # for Arm based macs (M1 and above).
18+ args : ' --target aarch64-apple-darwin'
19+ - platform : ' macos-latest' # for Intel based macs.
20+ args : ' --target x86_64-apple-darwin'
21+ - platform : ' ubuntu-22.04'
22+ args : ' '
23+ - platform : ' windows-latest'
24+ args : ' '
25+
26+ runs-on : ${{ matrix.platform }}
27+ steps :
28+ - uses : actions/checkout@v4
29+
30+ - name : install dependencies (ubuntu only)
31+ if : matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
32+ run : |
33+ sudo apt-get update
34+ sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
35+
36+ - name : setup node
37+ uses : actions/setup-node@v4
38+ with :
39+ node-version : lts/*
40+ cache : ' yarn' # Set this to npm, yarn or pnpm.
41+
42+ - name : install Rust stable
43+ uses : dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
44+ with :
45+ # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
46+ targets : ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
47+
48+ - name : Rust cache
49+ uses : swatinem/rust-cache@v2
50+ with :
51+ workspaces : ' ./src-tauri -> target'
52+
53+ - name : install frontend dependencies
54+ # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
55+ run : yarn install # change this to npm or pnpm depending on which one you use.
56+
57+ - uses : tauri-apps/tauri-action@v0
58+ env :
59+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ with :
61+ tagName : app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
62+ releaseName : ' App v__VERSION__'
63+ releaseBody : ' See the assets to download this version and install.'
64+ releaseDraft : true
65+ prerelease : false
66+ args : ${{ matrix.args }}
0 commit comments