Skip to content

fix(release): build jcode-computerd.app bundle before tauri build#158

Merged
cnjack merged 1 commit into
mainfrom
fix/release-computerd-bundle
Jul 20, 2026
Merged

fix(release): build jcode-computerd.app bundle before tauri build#158
cnjack merged 1 commit into
mainfrom
fix/release-computerd-bundle

Conversation

@cnjack

@cnjack cnjack commented Jul 20, 2026

Copy link
Copy Markdown
Owner

问题

Release workflow 的两个 macOS desktop job 在 v0.10.1 构建时失败(run 29684575654):

resource path `bundles/jcode-computerd.app` doesn't exist
Error failed to build app: failed to build app

原因

desktop/src-tauri/tauri.macos.conf.jsonbundles/jcode-computerd.app 声明为 bundle resource,但 release workflow 从未组装这个 .app。于是 pnpm tauri build 的 cargo build script 在检查资源时找不到文件而失败。

修复

Build desktop bundlepnpm 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' 时运行。

验证

  • 步骤顺序正确:先 build computerd bundle,再 tauri build。
  • 脚本输出 <output-dir>/jcode-computerd.app = desktop/src-tauri/bundles/jcode-computerd.app,与 resource 路径匹配。
  • 本地 pre-push 检查(go build/vet/lint/test)通过。
  • 真正的端到端验证需要在下次 Release tag 时由 CI 的 macOS job 确认。

Summary by CodeRabbit

  • New Features
    • Added automated macOS builds for the signed jcode-computerd.app bundle.
    • macOS release packages now include the required Swift helpers and onboarding interface.

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'.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The macOS desktop release workflow now builds the jcode-computerd.app bundle with the appropriate Swift target before existing signing and notarization steps.

Changes

macOS computerd bundle

Layer / File(s) Summary
Build computerd bundle
.github/workflows/release.yml
The macOS desktop job selects the Swift target from matrix.triple, creates the bundle output directory, and invokes script/build_computerd_bundle.sh before signing and notarization.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main release workflow change: building the jcode-computerd.app bundle before the Tauri build.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-computerd-bundle

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cnjack
cnjack merged commit 7d40f7c into main Jul 20, 2026
3 of 4 checks passed
@cnjack
cnjack deleted the fix/release-computerd-bundle branch July 20, 2026 02:40

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

336-339: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add 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

📥 Commits

Reviewing files that changed from the base of the PR and between 47c5817 and 8c15790.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant