Fix Windows zip layout and smoke path

This commit is contained in:
Advait Paliwal
2026-03-24 14:37:18 -07:00
parent 21b8bcd4c4
commit e651cb1f9b
2 changed files with 5 additions and 2 deletions

View File

@@ -97,7 +97,8 @@ jobs:
$tmp = Join-Path $env:RUNNER_TEMP ("feynman-smoke-" + [guid]::NewGuid().ToString("N"))
New-Item -ItemType Directory -Path $tmp | Out-Null
Expand-Archive -LiteralPath "dist/release/feynman-$version-win32-x64.zip" -DestinationPath $tmp -Force
& "$tmp/feynman-$version-win32-x64/feynman.cmd" --help | Select-Object -First 20
$bundleRoot = Join-Path $tmp "feynman-$version-win32-x64"
& (Join-Path $bundleRoot "feynman.cmd") --help | Select-Object -First 20
- uses: actions/upload-artifact@v4
with:
name: native-${{ matrix.id }}

View File

@@ -277,10 +277,12 @@ function packBundle(bundleRoot, target, outDir) {
if (target.bundleExtension === "zip") {
if (process.platform === "win32") {
const bundleDir = dirname(bundleRoot).replace(/'/g, "''");
const bundleName = basename(bundleRoot).replace(/'/g, "''");
run("powershell", [
"-NoProfile",
"-Command",
`Compress-Archive -Path '${bundleRoot.replace(/'/g, "''")}\\*' -DestinationPath '${archivePath.replace(/'/g, "''")}' -Force`,
`Push-Location '${bundleDir}'; Compress-Archive -Path '${bundleName}' -DestinationPath '${archivePath.replace(/'/g, "''")}' -Force; Pop-Location`,
]);
} else {
run("zip", ["-qr", archivePath, basename(bundleRoot)], { cwd: resolve(bundleRoot, "..") });