From 7a52b3bf7653f3d6b0eaba97f6d4460c33eb1600 Mon Sep 17 00:00:00 2001 From: Simon Klee Date: Fri, 17 Jul 2026 16:42:22 +0200 Subject: [PATCH] fix(cli): stabilize Windows ARM64 Node builds Run the Windows ARM64 package build on the Blacksmith Windows runner to avoid slow dependency installation on GitHub-hosted Windows machines. Use the Windows system tar executable when extracting Node archives so drive-letter paths are not interpreted as remote hosts by Git's GNU tar. --- .github/workflows/publish.yml | 2 +- packages/cli/script/build-node.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f6ac0b73bb90..7498bc24c977 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -135,7 +135,7 @@ jobs: - target: darwin-arm64 host: macos-26 - target: windows-arm64 - host: windows-2025 + host: blacksmith-4vcpu-windows-2025 - target: windows-x64 host: blacksmith-4vcpu-windows-2025 runs-on: ${{ matrix.settings.host }} diff --git a/packages/cli/script/build-node.ts b/packages/cli/script/build-node.ts index 0b4e29930e4f..9a67fd35d239 100644 --- a/packages/cli/script/build-node.ts +++ b/packages/cli/script/build-node.ts @@ -170,8 +170,10 @@ async function resolveTargetNode(target: NodeTarget, host?: string) { await rm(temporary, { recursive: true, force: true }) await mkdir(temporary) if (target.platform !== "win32") run("tar", ["-xzf", archive, "-C", temporary]) - else if (process.platform === "win32") run("tar", ["-xf", archive, "-C", temporary]) - else run("unzip", ["-q", archive, "-d", temporary]) + if (target.platform === "win32" && process.platform === "win32") { + run(path.join(process.env.SystemRoot ?? "C:\\Windows", "System32", "tar.exe"), ["-xf", archive, "-C", temporary]) + } + if (target.platform === "win32" && process.platform !== "win32") run("unzip", ["-q", archive, "-d", temporary]) await rm(targetDirectory, { recursive: true, force: true }) await rename(path.join(temporary, archiveName), targetDirectory) await writeFile(path.join(targetDirectory, ".verified"), `${expected}\n`)