44 push :
55 branches : [master]
66 tags : ["v*"]
7- schedule :
8- - cron : " 0 0 * * *"
7+ workflow_dispatch :
98
109env :
1110 CARGO_TERM_COLOR : always
1211
1312jobs :
14- build :
15- name : build (${{ matrix.target }})
13+ build-tauri :
14+ name : build (${{ matrix.label }})
1615 runs-on : ${{ matrix.os }}
1716 strategy :
1817 fail-fast : false
1918 matrix :
2019 include :
21- - os : ubuntu-latest
20+ - os : ubuntu-22.04
2221 target : x86_64-unknown-linux-gnu
23- artifact : fastpack-linux-x86_64.tar.gz
24- - os : macos-15-intel
25- target : x86_64-apple-darwin
26- artifact : fastpack-macos-x86_64.dmg
27- arch : x86_64
28- - os : macos-latest
29- target : aarch64-apple-darwin
30- artifact : fastpack-macos-aarch64.dmg
31- arch : aarch64
22+ label : Linux x86_64
23+ artifact : fastpack-linux-x86_64.AppImage
24+ bundle : appimage
25+ glob : " appimage/*.AppImage"
3226 - os : windows-latest
3327 target : x86_64-pc-windows-msvc
34- artifact : fastpack-windows-x86_64.msi
28+ label : Windows x86_64
29+ artifact : fastpack-windows-x86_64-setup.exe
30+ bundle : nsis
31+ glob : " nsis/*.exe"
3532
3633 steps :
3734 - uses : actions/checkout@v4
3835
36+ - uses : pnpm/action-setup@v4
37+ with :
38+ version : 9
39+
40+ - uses : actions/setup-node@v4
41+ with :
42+ node-version : lts/*
43+ cache : pnpm
44+ cache-dependency-path : crates/fastpack-tauri/pnpm-lock.yaml
45+
3946 - uses : dtolnay/rust-toolchain@stable
4047 with :
4148 targets : ${{ matrix.target }}
@@ -50,60 +57,117 @@ jobs:
5057 run : |
5158 sudo apt-get update -q
5259 sudo apt-get install -y \
53- libgtk-3-dev \
54- libxcb-render0-dev \
55- libxcb-shape0-dev \
56- libxcb-xfixes0-dev \
57- libxkbcommon-dev \
58- libssl-dev
60+ libwebkit2gtk-4.1-dev \
61+ libappindicator3-dev \
62+ librsvg2-dev \
63+ patchelf
5964
60- - run : cargo build --release --package fastpack --target ${{ matrix.target }} --all-features
65+ - name : install frontend deps
66+ working-directory : crates/fastpack-tauri
67+ run : pnpm install
6168
62- - name : package Linux
63- if : runner.os == 'Linux'
69+ - uses : tauri-apps/tauri-action@v0
70+ id : tauri
71+ env :
72+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
73+ with :
74+ projectPath : crates/fastpack-tauri
75+ tauriScript : pnpm tauri
76+ args : --target ${{ matrix.target }} --bundles ${{ matrix.bundle }}
77+
78+ - name : rename artifact
79+ shell : bash
6480 run : |
65- strip target/${{ matrix.target }}/release/fastpack
66- tar -czf ${{ matrix.artifact }} \
67- -C target/${{ matrix.target }}/release fastpack
81+ FILE=$(find crates/fastpack-tauri/src-tauri/target/${{ matrix.target }}/release/bundle/${{ matrix.glob }} | head -1)
82+ cp "$FILE" "${{ matrix.artifact }}"
83+
84+ - uses : actions/upload-artifact@v4
85+ with :
86+ name : ${{ matrix.artifact }}
87+ path : ${{ matrix.artifact }}
88+
89+ build-macos :
90+ name : build (macOS)
91+ runs-on : macos-latest
92+ steps :
93+ - uses : actions/checkout@v4
6894
69- - name : package macOS DMG
70- if : runner.os == 'macOS'
95+ - uses : pnpm/action-setup@v4
96+ with :
97+ version : 9
98+
99+ - uses : actions/setup-node@v4
100+ with :
101+ node-version : lts/*
102+ cache : pnpm
103+ cache-dependency-path : crates/fastpack-tauri/pnpm-lock.yaml
104+
105+ - uses : dtolnay/rust-toolchain@stable
106+ with :
107+ targets : aarch64-apple-darwin,x86_64-apple-darwin
108+
109+ - uses : Swatinem/rust-cache@v2
110+ with :
111+ shared-key : release-macos
112+ cache-on-failure : " true"
113+
114+ - name : install frontend deps
115+ working-directory : crates/fastpack-tauri
116+ run : pnpm install
117+
118+ - name : build ARM
119+ uses : tauri-apps/tauri-action@v0
71120 env :
72- APPLE_CERT_P12 : ${{ secrets.APPLE_CERT_P12 }}
73- APPLE_CERT_PASSWORD : ${{ secrets.APPLE_CERT_PASSWORD }}
121+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
122+ APPLE_CERTIFICATE : ${{ secrets.APPLE_CERT_P12 }}
123+ APPLE_CERTIFICATE_PASSWORD : ${{ secrets.APPLE_CERT_PASSWORD }}
74124 APPLE_ID : ${{ secrets.APPLE_ID }}
75- APPLE_APP_PASSWORD : ${{ secrets.APPLE_APP_PASSWORD }}
125+ APPLE_PASSWORD : ${{ secrets.APPLE_APP_PASSWORD }}
76126 APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
127+ APPLE_SIGNING_IDENTITY : ${{ secrets.APPLE_SIGNING_IDENTITY }}
128+ with :
129+ projectPath : crates/fastpack-tauri
130+ tauriScript : pnpm tauri
131+ args : --target aarch64-apple-darwin --bundles dmg
132+
133+ - name : rename ARM artifact
77134 run : |
78- brew install svg2png
79- bash .github/scripts/package-macos.sh \
80- "target/${{ matrix.target }}/release/fastpack" \
81- "${{ matrix.artifact }}"
135+ FILE=$(find crates/fastpack-tauri/src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg | head -1)
136+ cp "$FILE" fastpack-macos-aarch64.dmg
82137
83- - name : install WiX v4
84- if : runner.os == 'Windows'
138+ - name : build Intel
139+ uses : tauri-apps/tauri-action@v0
140+ env :
141+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
142+ APPLE_CERTIFICATE : ${{ secrets.APPLE_CERT_P12 }}
143+ APPLE_CERTIFICATE_PASSWORD : ${{ secrets.APPLE_CERT_PASSWORD }}
144+ APPLE_ID : ${{ secrets.APPLE_ID }}
145+ APPLE_PASSWORD : ${{ secrets.APPLE_APP_PASSWORD }}
146+ APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
147+ APPLE_SIGNING_IDENTITY : ${{ secrets.APPLE_SIGNING_IDENTITY }}
148+ with :
149+ projectPath : crates/fastpack-tauri
150+ tauriScript : pnpm tauri
151+ args : --target x86_64-apple-darwin --bundles dmg
152+
153+ - name : rename Intel artifact
85154 run : |
86- dotnet tool install --global wix
87- wix extension add WixToolset.UI.wixext/6.0.2
88-
89- - name : package Windows MSI
90- if : runner.os == 'Windows'
91- run : >-
92- wix build crates/fastpack/wix/main.wxs
93- -arch x64
94- -bindpath target/${{ matrix.target }}/release
95- -bindpath crates/fastpack/wix
96- -ext WixToolset.UI.wixext/6.0.2
97- -o ${{ matrix.artifact }}
155+ FILE=$(find crates/fastpack-tauri/src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg | head -1)
156+ cp "$FILE" fastpack-macos-x86_64.dmg
98157
99158 - uses : actions/upload-artifact@v4
100159 with :
101- name : ${{ matrix.artifact }}
102- path : ${{ matrix.artifact }}
160+ name : fastpack-macos-aarch64.dmg
161+ path : fastpack-macos-aarch64.dmg
162+
163+ - uses : actions/upload-artifact@v4
164+ with :
165+ name : fastpack-macos-x86_64.dmg
166+ path : fastpack-macos-x86_64.dmg
103167
104168 release :
105169 name : release
106- needs : build
170+ needs : [ build-tauri, build-macos]
107171 runs-on : ubuntu-latest
108172 permissions :
109173 contents : write
0 commit comments