feat(windows): add arm64 release targets for cli and desktop#16299
feat(windows): add arm64 release targets for cli and desktop#16299Hona wants to merge 2 commits intoanomalyco:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Windows ARM64 support across the OpenCode CLI build/release pipeline and both Desktop (Tauri) + Desktop Electron sidecar/updater metadata, so Windows-on-ARM users can install/run native builds.
Changes:
- Add Windows ARM64 target to CLI build matrix and include Windows ARM64 ripgrep download mapping.
- Add Windows ARM64 sidecar configuration for Tauri and Electron desktop builds.
- Update release publishing workflow + “latest” metadata finalization to account for Windows ARM64 artifacts.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/opencode/src/file/ripgrep.ts | Add ripgrep download/extraction platform mapping for win32 arm64. |
| packages/opencode/script/build.ts | Add win32 arm64 to CLI build targets. |
| packages/opencode/package.json | Include @parcel/watcher prebuild for win32 arm64. |
| packages/desktop/scripts/utils.ts | Add win32 arm64 sidecar mapping for Tauri desktop. |
| packages/desktop/scripts/finalize-latest-json.ts | Add Windows ARM64 artifacts/aliases to generated latest.json. |
| packages/desktop-electron/scripts/utils.ts | Add win32 arm64 sidecar mapping + native target detection for Windows ARM64. |
| packages/desktop-electron/scripts/finalize-latest-yml.ts | Merge Windows x64 + arm64 latest.yml entries into a single published latest.yml. |
| .github/workflows/publish.yml | Add Windows ARM64 build targets for Tauri + Electron publish matrices. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { key: "linux-aarch64-rpm", asset: "opencode-desktop-linux-aarch64.rpm" }, | ||
| { key: "windows-aarch64-nsis", asset: "opencode-desktop-windows-arm64.exe" }, | ||
| { key: "windows-x86_64-nsis", asset: "opencode-desktop-windows-x64.exe" }, |
There was a problem hiding this comment.
OPENCODE_VERSION is read into version and then used to build download URLs (via v${version}), but earlier in this script the guard mistakenly checks releaseId a second time instead of validating version. If OPENCODE_VERSION is unset, this will silently generate vundefined URLs for all targets (including the new Windows arm64 entry). Update the env var validation to throw when version is missing.
| { | ||
| rustTarget: "aarch64-pc-windows-msvc", | ||
| ocBinary: "opencode-windows-arm64", | ||
| assetExt: "zip", | ||
| }, |
There was a problem hiding this comment.
In getCurrentSidecar, the thrown error interpolates RUST_TARGET instead of the target argument. This can produce misleading messages (e.g., when target is passed explicitly or when the env var is unset). Use the target parameter in the error message (and the initial guard) so the failure accurately reports which Rust target was requested.
$(cat <<'EOF'