Skip to content

Commit 058e737

Browse files
committed
migrate to tauri v2
1 parent 6eda387 commit 058e737

8 files changed

Lines changed: 3408 additions & 1417 deletions

File tree

.github/workflows/build.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Build
22

33
on:
4-
push:
4+
push:
55
branches: ['main']
66
workflow_dispatch:
77

88
env:
99
CARGO_TERM_COLOR: always
10-
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
11-
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
10+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
11+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
1212

1313
jobs:
1414
build-mac-x86_64:
@@ -22,14 +22,14 @@ jobs:
2222
workspaces: "./src-tauri -> target"
2323

2424
- name: Install tauri CLI
25-
run: cargo install tauri-cli@^1
25+
run: cargo install tauri-cli@^2
2626

2727
- name: Install packages
2828
run: npm i
2929

3030
- name: Build
31-
run: cargo tauri build --target x86_64-apple-darwin
32-
31+
run: rustup target add x86_64-apple-darwin && cargo tauri build --target x86_64-apple-darwin
32+
3333
- name: Upload artifact x86_64
3434
uses: actions/upload-artifact@v4
3535
with:
@@ -42,14 +42,14 @@ jobs:
4242
runs-on: macos-26
4343

4444
steps:
45-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4646

4747
- uses: Swatinem/rust-cache@v2
4848
with:
4949
workspaces: "./src-tauri -> target"
5050

5151
- name: Install tauri CLI
52-
run: cargo install tauri-cli@^1
52+
run: cargo install tauri-cli@^2
5353

5454
- name: Install packages
5555
run: npm i
@@ -64,7 +64,7 @@ jobs:
6464
path: |
6565
src-tauri/target/aarch64-apple-darwin/release/bundle/macos
6666
src-tauri/target/aarch64-apple-darwin/release/bundle/dmg
67-
67+
6868
build-win-x86_64:
6969
runs-on: windows-latest
7070

@@ -76,14 +76,14 @@ jobs:
7676
workspaces: "./src-tauri -> target"
7777

7878
- name: Install tauri CLI
79-
run: cargo install tauri-cli@^1
79+
run: cargo install tauri-cli@^2
8080

8181
- name: Install packages
8282
run: npm i
8383

8484
- name: Build
8585
run: cargo tauri build --target x86_64-pc-windows-msvc
86-
86+
8787
- name: Upload artifact
8888
uses: actions/upload-artifact@v4
8989
with:
@@ -102,14 +102,14 @@ jobs:
102102
workspaces: "./src-tauri -> target"
103103

104104
- name: Install tauri CLI
105-
run: cargo install tauri-cli@^1
105+
run: cargo install tauri-cli@^2
106106

107107
- name: Install packages
108108
run: npm i
109109

110110
- name: Build
111111
run: rustup target add i686-pc-windows-msvc && cargo tauri build --target i686-pc-windows-msvc
112-
112+
113113
- name: Upload artifact
114114
uses: actions/upload-artifact@v4
115115
with:
@@ -128,15 +128,15 @@ jobs:
128128
workspaces: "./src-tauri -> target"
129129

130130
- name: Install tauri CLI
131-
run: cargo install tauri-cli@^1
131+
run: cargo install tauri-cli@^2
132132

133133
- name: Install packages
134134
run: npm i
135-
135+
136136
- name: Install build deps
137137
run: |
138138
sudo apt update
139-
sudo apt install libwebkit2gtk-4.0-dev \
139+
sudo apt install libwebkit2gtk-4.1-dev \
140140
build-essential \
141141
curl \
142142
wget \
@@ -147,7 +147,7 @@ jobs:
147147
148148
- name: Build
149149
run: cargo tauri build --target x86_64-unknown-linux-gnu
150-
150+
151151
- name: Upload artifact
152152
uses: actions/upload-artifact@v4
153153
with:
@@ -183,25 +183,25 @@ jobs:
183183
with:
184184
name: app-darwin-86_64
185185
path: darwin-x86_64
186-
186+
187187
- name: Download darwin-aarch64
188188
uses: actions/download-artifact@v4
189189
with:
190190
name: app-darwin-aarch64
191191
path: darwin-aarch64
192-
192+
193193
- name: Download windows-x86_64
194194
uses: actions/download-artifact@v4
195195
with:
196196
name: app-windows-86_64
197197
path: windows-x86_64
198-
198+
199199
- name: Download windows-i686
200200
uses: actions/download-artifact@v4
201201
with:
202202
name: app-windows-i686
203203
path: windows-i686
204-
204+
205205
- name: Download linux-x86_64
206206
uses: actions/download-artifact@v4
207207
with:
@@ -213,7 +213,7 @@ jobs:
213213
with:
214214
name: app-linux-x86_64-deb
215215
path: linux-x86_64
216-
216+
217217
- name: Change paths
218218
run: |
219219
mv darwin-x86_64/macos/* darwin-x86_64
@@ -240,7 +240,7 @@ jobs:
240240
mv linux-x86_64/*.AppImage.tar.gz.sig linux-x86_64/Adapt.AppImage.tar.gz.sig
241241
mv linux-x86_64/*.deb linux-x86_64/Adapt.deb
242242
rm -rf linux-x86_64/*_amd64
243-
243+
244244
- name: Copy to artifacts dir
245245
run: |
246246
mkdir download-artifacts
@@ -290,7 +290,7 @@ jobs:
290290
})
291291
)
292292
shell: python
293-
293+
294294
- name: Show artifacts
295295
run: ls -R download-artifacts
296296

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"license": "MIT",
1313
"devDependencies": {
14-
"@tauri-apps/cli": "^1.2.3",
14+
"@tauri-apps/cli": "^2",
1515
"@types/node": "^18.11.18",
1616
"autoprefixer": "^10.4.13",
1717
"postcss": "^8.4",
@@ -23,6 +23,11 @@
2323
},
2424
"dependencies": {
2525
"@jaames/iro": "^5.5.2",
26+
"@tauri-apps/api": "^2",
27+
"@tauri-apps/plugin-dialog": "^2",
28+
"@tauri-apps/plugin-notification": "^2",
29+
"@tauri-apps/plugin-updater": "^2",
30+
"@tauri-apps/plugin-process": "^2",
2631
"@nerimity/solid-turnstile": "^1.1.0",
2732
"@solid-primitives/map": "^0.3.2",
2833
"@solid-primitives/media": "^2.1.1",

src-tauri/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Generated by Cargo
22
# will have compiled files and executables
33
/target/
4+
gen

0 commit comments

Comments
 (0)