1414 TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
1515 TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
1616 TAURI_BUNDLE : all
17-
17+
1818jobs :
19- build :
19+ publish-tauri :
20+ permissions :
21+ contents : write
22+ packages : write
2023 strategy :
24+ fail-fast : false
2125 matrix :
22- platform :
23- - os : ubuntu-latest
24- target : x86_64-unknown-linux-gnu
25- name : Linux x86_64
26- artifact-name : MCPLinker-linux-x64
27- artifact-path : |
28- tauri-app/src-tauri/target/x86_64-unknown-linux-gnu/release/**/*.deb
29- tauri-app/src-tauri/target/x86_64-unknown-linux-gnu/release/**/*.rpm
30- tauri-app/src-tauri/target/x86_64-unknown-linux-gnu/release/**/*.AppImage
31- tauri-app/src-tauri/target/x86_64-unknown-linux-gnu/release/**/*.deb.sig
32- tauri-app/src-tauri/target/x86_64-unknown-linux-gnu/release/**/*.rpm.sig
33- tauri-app/src-tauri/target/x86_64-unknown-linux-gnu/release/**/*.AppImage.sig
34- - os : windows-latest
35- target : x86_64-pc-windows-msvc
36- name : Windows x86_64
37- artifact-name : MCPLinker_Windows_x64
38- artifact-path : |
39- tauri-app/src-tauri/target/release/bundle/**/*.exe
40- tauri-app/src-tauri/target/release/bundle/**/*.msi
41- tauri-app/src-tauri/target/release/bundle/**/*.exe.sig
42- tauri-app/src-tauri/target/release/bundle/**/*.msi.sig
43-
44- runs-on : ${{ matrix.platform.os }}
45- name : Build ${{ matrix.platform.name }}
26+ include :
27+ - platform : ' macos-latest' # for Arm based macs (M1 and above).
28+ args : ' --target aarch64-apple-darwin'
29+ - platform : ' macos-latest' # for Intel based macs.
30+ args : ' --target x86_64-apple-darwin'
31+ - platform : ' ubuntu-24.04'
32+ args : ' '
33+ - platform : ' windows-latest'
34+ args : ' '
4635
36+ runs-on : ${{ matrix.platform }}
4737 steps :
48- - name : Checkout code
49- uses : actions/checkout@v4
38+ - uses : actions/checkout@v4
5039
51- - name : Install Linux dependencies
52- if : runner.os == 'Linux'
53- run : |
54- sudo apt update
55- sudo apt install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
40+ - name : setup node
41+ uses : actions/setup-node@v4
42+ with :
43+ node-version : lts/*
5644
57- - name : Install Rust toolchain
45+ - name : Install Bun
46+ uses : oven-sh/setup-bun@v2
47+
48+ - name : install Rust stable
5849 uses : dtolnay/rust-toolchain@stable
50+ with :
51+ # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
52+ targets : ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
5953
6054 - name : Setup Rust cache
6155 uses : Swatinem/rust-cache@v2
6256 with :
63- workspaces : src-tauri
57+ workspaces : tauri-app/ src-tauri
6458
65- - name : Setup Node.js
66- uses : actions/setup-node@v4
67- with :
68- node-version : 20
69-
70- - name : Install Bun
71- uses : oven-sh/setup-bun@v2
59+ - name : install dependencies (ubuntu only)
60+ if : runner.os == 'Linux'
61+ run : |
62+ sudo apt-get update
63+ sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
7264
73- - name : Install dependencies
65+ - name : install frontend dependencies
7466 run : bun install
7567 working-directory : tauri-app
7668
77- - name : Build Tauri App
78- run : bun tauri build ${{ runner.os == 'Linux' && format('--target {0}', matrix.platform.target) || '' }}
79- working-directory : tauri-app
80-
81- - name : Upload build artifacts
82- uses : actions/upload-artifact@v4
83- with :
84- name : ${{ matrix.platform.artifact-name }}
85- path : ${{ matrix.platform.artifact-path }}
86-
87- - name : Upload to GitHub Release
88- uses : softprops/action-gh-release@v2
89- if : startsWith(github.ref, 'refs/tags/v')
90- with :
91- files : |
92- ${{ matrix.platform.artifact-path }}
69+ - uses : tauri-apps/tauri-action@v0
9370 env :
94- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72+ with :
73+ tagName : v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
74+ releaseName : ' v__VERSION__'
75+ releaseBody : ' See the assets to download this version and install.'
76+ releaseDraft : false
77+ prerelease : false
78+ args : ${{ matrix.args }}
0 commit comments