Skip to content

Commit 345f419

Browse files
committed
build(ci): 升级 Node.js 和 pnpm 版本并调整环境变量
- 将 Node.js 版本从 20 升级到 22 - 将 pnpm 版本从 8 升级到 10.13.1 - 在构建过程中设置 SKIP_CHECK_ENV 环境变量 - 更新命令装饰器使用 tauri::command
1 parent e5cf139 commit 345f419

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/release-test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: setup node
3434
uses: actions/setup-node@v4
3535
with:
36-
node-version: 20
36+
node-version: 22
3737

3838
- name: install Rust stable
3939
uses: dtolnay/rust-toolchain@stable
@@ -56,7 +56,7 @@ jobs:
5656
uses: pnpm/action-setup@v4
5757
id: pnpm-install
5858
with:
59-
version: 8
59+
version: 10.13.1
6060
run_install: false
6161

6262
- name: Install app dependencies and build it
@@ -65,6 +65,7 @@ jobs:
6565
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6666
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
6767
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
68+
SKIP_CHECK_ENV: 1
6869

6970
- name: Create Release
7071
uses: tauri-apps/[email protected]

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: setup node
3333
uses: actions/setup-node@v4
3434
with:
35-
node-version: 20
35+
node-version: 22
3636

3737
- name: install Rust stable
3838
uses: dtolnay/rust-toolchain@stable
@@ -53,7 +53,7 @@ jobs:
5353
uses: pnpm/action-setup@v4
5454
id: pnpm-install
5555
with:
56-
version: 8
56+
version: 10.13.1
5757
run_install: false
5858

5959
# 读取更新文档内容 (保留换行符)
@@ -74,6 +74,7 @@ jobs:
7474
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7575
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
7676
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
77+
SKIP_CHECK_ENV: 1
7778

7879
- name: Create Release
7980
uses: tauri-apps/[email protected]

src-tauri/src/mobiles/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub struct DirStats {
99
}
1010

1111
/// 扫描目录统计信息
12-
#[command]
12+
#[tauri::command]
1313
pub async fn scan_dir_stats(path: PathBuf) -> Result<DirStats, String> {
1414
use std::fs;
1515

0 commit comments

Comments
 (0)