Skip to content

Commit 0e8b25c

Browse files
committed
fix(release): switch Windows ARM64 bundles to NSIS
The v3.16.4-8 release run proved the earlier sidecar and x64 runner fixes, but Windows ARM64 still failed after successfully cross-compiling cc-switch.exe and codex-history-repairer.exe. The remaining failure was in WiX v3 light.exe while producing the ARM64 MSI on windows-2022. Root fix: stop treating Windows ARM64 MSI as a required release artifact. Build aarch64-pc-windows-msvc on the x64 Windows runner with NSIS, collect the ARM64 Setup.exe and signature first, and leave MSI as an optional compatibility artifact only. Update the GitHub release copy, bump the version to 3.16.4-9, add release notes, and record the workflow invariant in memory.md. Validation: pnpm exec prettier --check package.json src-tauri/tauri.conf.json docs/release-notes/v3.16.4-9-zh.md .github/workflows/release.yml memory.md; pnpm typecheck; cargo metadata --manifest-path src-tauri/Cargo.toml --no-deps --format-version 1; git diff --check. actionlint is not installed locally, so the tag run will be the workflow syntax verification.
1 parent 07bc4b9 commit 0e8b25c

7 files changed

Lines changed: 54 additions & 28 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ jobs:
2020
matrix:
2121
include:
2222
- os: windows-2022
23-
# GitHub 的 Windows ARM64 runner 能编译主程序,但 WiX v3 light.exe 在该
24-
# 环境中无法可靠启动;ARM64 安装包改由 x64 Windows runner 交叉打包。
23+
# GitHub 的 Windows ARM64 runner 能编译主程序,但 WiX v3 light.exe 在
24+
# ARM64 runner 和 x64 cross-build 两条路径上都不稳定;ARM64 改由 x64
25+
# Windows runner 交叉编译主程序,并使用 NSIS 生成安装包。
2526
- os: windows-2022
2627
arch: arm64
2728
- os: ubuntu-22.04
@@ -320,7 +321,7 @@ jobs:
320321
run: |
321322
$ErrorActionPreference = 'Stop'
322323
if ($env:WINDOWS_RELEASE_ARCH -eq 'arm64') {
323-
pnpm tauri build --target aarch64-pc-windows-msvc --bundles msi
324+
pnpm tauri build --target aarch64-pc-windows-msvc --bundles nsis
324325
} else {
325326
pnpm tauri build --bundles nsis
326327
}
@@ -530,7 +531,28 @@ jobs:
530531
$targetRoot = if ($isArm64) { 'src-tauri/target/aarch64-pc-windows-msvc/release' } else { 'src-tauri/target/release' }
531532
$assetSuffix = if ($isArm64) { '-arm64' } else { '' }
532533
533-
# 仅 ARM64 继续使用 MSI;x64 使用 NSIS,避免 GitHub Windows runner 上 WiX light.exe 间歇失败。
534+
$nsis = Get-ChildItem -Path (Join-Path $targetRoot 'bundle/nsis') -Recurse -Include *.exe -ErrorAction SilentlyContinue | Select-Object -First 1
535+
if ($null -ne $nsis) {
536+
$dest = "CC-Switch-$VERSION-Windows$assetSuffix-Setup.exe"
537+
Copy-Item $nsis.FullName (Join-Path release-assets $dest)
538+
Write-Host "NSIS installer copied: $dest"
539+
$sigPath = "$($nsis.FullName).sig"
540+
if (Test-Path $sigPath) {
541+
Copy-Item $sigPath (Join-Path release-assets ("$dest.sig"))
542+
Write-Host "Signature copied: $dest.sig"
543+
} elseif (-not $isArm64) {
544+
Write-Warning "Signature not found for $($nsis.Name)"
545+
} else {
546+
throw "Signature not found for $($nsis.Name)"
547+
}
548+
} elseif (-not $isArm64) {
549+
throw 'No Windows x64 NSIS installer found'
550+
} else {
551+
throw 'No Windows ARM64 NSIS installer found'
552+
}
553+
554+
# MSI 是兼容旧发布的可选资产。Windows ARM64 不再强制产 MSI,因为 WiX v3
555+
# light.exe 在 GitHub hosted runner 上对 ARM64 MSI 仍会失败。
534556
$msi = Get-ChildItem -Path (Join-Path $targetRoot 'bundle/msi') -Recurse -Include *.msi -ErrorAction SilentlyContinue | Select-Object -First 1
535557
if ($null -eq $msi) {
536558
# 兜底:全局搜索 .msi
@@ -549,26 +571,8 @@ jobs:
549571
} else {
550572
Write-Warning "Signature not found for $($msi.Name)"
551573
}
552-
} elseif ($isArm64) {
553-
throw 'No Windows ARM64 MSI installer found'
554574
} else {
555-
Write-Warning 'No Windows MSI installer found'
556-
}
557-
558-
$nsis = Get-ChildItem -Path (Join-Path $targetRoot 'bundle/nsis') -Recurse -Include *.exe -ErrorAction SilentlyContinue | Select-Object -First 1
559-
if ($null -ne $nsis) {
560-
$dest = "CC-Switch-$VERSION-Windows$assetSuffix-Setup.exe"
561-
Copy-Item $nsis.FullName (Join-Path release-assets $dest)
562-
Write-Host "NSIS installer copied: $dest"
563-
$sigPath = "$($nsis.FullName).sig"
564-
if (Test-Path $sigPath) {
565-
Copy-Item $sigPath (Join-Path release-assets ("$dest.sig"))
566-
Write-Host "Signature copied: $dest.sig"
567-
} elseif (-not $isArm64) {
568-
Write-Warning "Signature not found for $($nsis.Name)"
569-
}
570-
} elseif (-not $isArm64) {
571-
throw 'No Windows x64 NSIS installer found'
575+
Write-Warning 'No Windows MSI installer found; NSIS installer was already collected'
572576
}
573577
574578
# 绿色版(portable):仅可执行文件打 zip(不参与 Updater)
@@ -718,7 +722,7 @@ jobs:
718722
719723
- **macOS**: `CC-Switch-${{ github.ref_name }}-macOS.dmg`(推荐)或 `CC-Switch-${{ github.ref_name }}-macOS.zip`(解压即用)
720724
- **Windows (x86_64)**: `CC-Switch-${{ github.ref_name }}-Windows-Setup.exe`(安装版)或 `CC-Switch-${{ github.ref_name }}-Windows-Portable.zip`(绿色版)
721-
- **Windows (ARM64)**: `CC-Switch-${{ github.ref_name }}-Windows-arm64.msi`(安装版)或 `CC-Switch-${{ github.ref_name }}-Windows-arm64-Portable.zip`(绿色版)
725+
- **Windows (ARM64)**: `CC-Switch-${{ github.ref_name }}-Windows-arm64-Setup.exe`(安装版)或 `CC-Switch-${{ github.ref_name }}-Windows-arm64-Portable.zip`(绿色版)
722726
- **Linux (x86_64)**: `CC-Switch-${{ github.ref_name }}-Linux-x86_64.AppImage` / `.deb` / `.rpm`
723727
- **Linux (ARM64)**: `CC-Switch-${{ github.ref_name }}-Linux-arm64.AppImage` / `.deb` / `.rpm`
724728

docs/release-notes/v3.16.4-9-zh.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# CCSwitchMulti v3.16.4-9 发布说明
2+
3+
本版本继续修复 `v3.16.4-8` 标签发布时暴露的 GitHub Release workflow 问题。
4+
5+
## 修复
6+
7+
- Windows ARM64 Release 不再强制产出 MSI。`v3.16.4-8` 已证明 x64 runner 可以交叉编译 ARM64 主程序和 history repair sidecar,但 WiX v3 `light.exe` 在 ARM64 MSI 打包阶段仍会失败。
8+
- Windows ARM64 改为使用 NSIS 安装包:`CC-Switch-v3.16.4-9-Windows-arm64-Setup.exe`,并继续产出绿色版 `CC-Switch-v3.16.4-9-Windows-arm64-Portable.zip`
9+
- Release 资产收集逻辑同步改为优先收集 Windows ARM64 NSIS 安装包;MSI 只作为可选兼容资产,不再阻塞发布。
10+
- GitHub Release 下载说明和 `latest.json` 生成规则保留对 `Windows-arm64-Setup.exe` 的识别,确保 Windows ARM64 updater 元数据可以从 NSIS 签名生成。
11+
12+
## 验证
13+
14+
- `v3.16.4-8` Release run 已验证 Windows x64、Linux x64、Linux ARM64 构建成功;Windows ARM64 失败点收敛到 WiX `light.exe`
15+
- 本版本用于验证 Windows ARM64 改走 NSIS 后的完整 tag release 链路。

memory.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CC Switch Repository Memory
22

3+
## 2026-07-03 GitHub Release Windows ARM64 NSIS Fallback
4+
5+
- `v3.16.4-8` tag 验证了上一轮 CI/Release 修复的大部分链路:main push CI 成功;Release 的 Linux x64、Linux ARM64、Windows x64 均成功;Windows ARM64 已成功交叉编译主程序和 `codex-history-repairer.exe` sidecar。
6+
- 新失败点仍在 Windows ARM64 安装包阶段:x64 `windows-2022` runner 上执行 `pnpm tauri build --target aarch64-pc-windows-msvc --bundles msi` 时,主程序已构建到 `src-tauri/target/aarch64-pc-windows-msvc/release/cc-switch.exe`,但 WiX v3 `light.exe``Running light to produce ..._arm64_en-US.msi` 后失败,日志只有 `failed to run ...\WixTools314\light.exe`。这说明把 ARM64 从 `windows-11-arm` 挪到 x64 runner 只能解决 runner 环境启动问题,不能保证 WiX3 ARM64 MSI 打包可靠。
7+
- 修复边界:Windows ARM64 release 不再强制产 MSI,改成 x64 runner 交叉编译 `aarch64-pc-windows-msvc` 后用 NSIS 生成 `CC-Switch-v*-Windows-arm64-Setup.exe`,同时继续产出 `Windows-arm64-Portable.zip`。MSI 只作为兼容旧发布的可选资产,缺失不再阻塞 Release。
8+
- 相关 workflow 不变量:`assemble-latest-json` 已支持 `*-Windows-arm64-Setup.exe` 映射到 `windows-aarch64``Prepare Windows Assets` 必须先收集 NSIS 并要求签名,再把 MSI 作为可选附加资产;GitHub Release 下载文案必须写 ARM64 `Setup.exe` 而不是 `.msi`
9+
310
## 2026-07-03 GitHub Flow CI/Release Failure Root Fix
411

512
- `v3.16.4-7` 推到 `BigStrongSun/ccswitchmulti` 后 GitHub Actions 有两类真实失败:CI 的 `Backend Checks` 卡在 Rust Clippy,Release 的 Windows 打包卡在 Windows 资产构建。不要把它归因为 GitHub 本身抽风,也不要只重跑 workflow。

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cc-switch-multi",
3-
"version": "3.16.4-8",
3+
"version": "3.16.4-9",
44
"description": "All-in-One Assistant for Claude Code, Codex & Gemini CLI",
55
"type": "module",
66
"scripts": {

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cc-switch"
3-
version = "3.16.4-8"
3+
version = "3.16.4-9"
44
description = "All-in-One Assistant for Claude Code, Codex & Gemini CLI"
55
authors = ["Jason Young"]
66
license = "MIT"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "CCSwitchMulti",
4-
"version": "3.16.4-8",
4+
"version": "3.16.4-9",
55
"identifier": "com.ccswitchmulti.desktop",
66
"build": {
77
"frontendDist": "../dist",

0 commit comments

Comments
 (0)