fix(release): build jcode-computerd.app bundle before tauri build#158
Conversation
tauri.macos.conf.json declares bundles/jcode-computerd.app as a resource, but the release workflow never assembled it, so the Tauri build script failed with 'resource path bundles/jcode-computerd.app doesn't exist' on both macOS desktop jobs. Add a step that runs script/build_computerd_bundle.sh to produce the bundle before 'pnpm tauri build'.
📝 WalkthroughWalkthroughThe macOS desktop release workflow now builds the ChangesmacOS computerd bundle
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
336-339: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd a fallback case for unsupported target triples.
For consistency with the "Build sidecar" step and to ensure the workflow fails with an explicit error if a new macOS architecture is added to the matrix in the future, consider adding a default fallback case.
♻️ Proposed refactor
case "${{ matrix.triple }}" in aarch64-apple-darwin) SWIFT_TARGET="arm64-apple-macos14.0" ;; x86_64-apple-darwin) SWIFT_TARGET="x86_64-apple-macos14.0" ;; + *) echo "unsupported Swift target triple: ${{ matrix.triple }}" >&2; exit 1 ;; esac🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release.yml around lines 336 - 339, Update the case statement mapping matrix.triple to SWIFT_TARGET by adding a default branch that emits an explicit error and terminates the workflow for unsupported triples. Keep the existing aarch64-apple-darwin and x86_64-apple-darwin mappings unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/release.yml:
- Around line 336-339: Update the case statement mapping matrix.triple to
SWIFT_TARGET by adding a default branch that emits an explicit error and
terminates the workflow for unsupported triples. Keep the existing
aarch64-apple-darwin and x86_64-apple-darwin mappings unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0bfccfc5-b931-43b4-9f8c-ef77bedd13b7
📒 Files selected for processing (1)
.github/workflows/release.yml
问题
Release workflow 的两个 macOS desktop job 在 v0.10.1 构建时失败(run 29684575654):
原因
desktop/src-tauri/tauri.macos.conf.json把bundles/jcode-computerd.app声明为 bundle resource,但 release workflow 从未组装这个 .app。于是pnpm tauri build的 cargo build script 在检查资源时找不到文件而失败。修复
在
Build desktop bundle(pnpm tauri build)之前新增Build computerd bundle步骤,按 matrix triple 选择 Swift target,调用script/build_computerd_bundle.sh把 bundle 产出到desktop/src-tauri/bundles/,路径与 tauri.macos.conf.json 声明的 resource 一致。仅在runner.os == 'macOS'时运行。验证
<output-dir>/jcode-computerd.app=desktop/src-tauri/bundles/jcode-computerd.app,与 resource 路径匹配。Summary by CodeRabbit
jcode-computerd.appbundle.