fix(ci): 修 Rust Shell 工作流 —— resources 只声明构建期必产出的文件

CI 失败根因(本地已复现确认):`tauri-build`(build.rs) 会在**编译期校验**
`tauri.conf.json` 的 `bundle.resources` 声明文件是否存在。
我之前声明了两项:`sidecar.mjs`(CI 未生成)+ `resources/node`(Node 运行时未下载)
→ build.rs 直接失败("failed to run custom build command")。

修复:
- `tauri.conf.json` 的 resources **只留 sidecar.mjs**,并写明为何不能声明未就绪的文件
- `rust.yml` 在 clippy/test **之前**加「构建 sidecar」步骤(`pnpm --filter nodeagent-console sidecar:build`)
- console-plan.md:⑤ 不再把 node 记为已完成(未验证的不写成做完),
  补「已知待办」(Node 运行时随包分发 + GUI 端到端人工验证)与「构建约束」说明

本地复现验证:删掉 `sidecar/dist/` → `cargo check` 复现同一错误;恢复 → 通过 ✓
This commit is contained in:
jkooe committed 2026-10-10 15:25:12 +08:00
1 parent 53bf5a0634
commit 9bba53d5c0
3 files changed
+26 -3

No files matched your search

+5
View File
@@ -61,6 +61,11 @@ jobs:
- name: 构建 workspace 包(sidecar 依赖其 dist)
run: pnpm -r --filter "./packages/*" build
# ⚠️ tauri-build 在**编译期**校验 tauri.conf.json 里 resources 的文件存在性,
# 故必须先产出 sidecar.mjs,否则 clippy/test 会在 build.rs 阶段就失败。
- name: 构建 sidecar(resources 引用的产物)
run: pnpm --filter nodeagent-console sidecar:build
- name: 缓存 cargo 构建产物
uses: Swatinem/rust-cache@v2
with: