Fix Windows zip layout and smoke path
This commit is contained in:
3
.github/workflows/publish.yml
vendored
3
.github/workflows/publish.yml
vendored
@@ -97,7 +97,8 @@ jobs:
|
|||||||
$tmp = Join-Path $env:RUNNER_TEMP ("feynman-smoke-" + [guid]::NewGuid().ToString("N"))
|
$tmp = Join-Path $env:RUNNER_TEMP ("feynman-smoke-" + [guid]::NewGuid().ToString("N"))
|
||||||
New-Item -ItemType Directory -Path $tmp | Out-Null
|
New-Item -ItemType Directory -Path $tmp | Out-Null
|
||||||
Expand-Archive -LiteralPath "dist/release/feynman-$version-win32-x64.zip" -DestinationPath $tmp -Force
|
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
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: native-${{ matrix.id }}
|
name: native-${{ matrix.id }}
|
||||||
|
|||||||
@@ -277,10 +277,12 @@ function packBundle(bundleRoot, target, outDir) {
|
|||||||
|
|
||||||
if (target.bundleExtension === "zip") {
|
if (target.bundleExtension === "zip") {
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
|
const bundleDir = dirname(bundleRoot).replace(/'/g, "''");
|
||||||
|
const bundleName = basename(bundleRoot).replace(/'/g, "''");
|
||||||
run("powershell", [
|
run("powershell", [
|
||||||
"-NoProfile",
|
"-NoProfile",
|
||||||
"-Command",
|
"-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 {
|
} else {
|
||||||
run("zip", ["-qr", archivePath, basename(bundleRoot)], { cwd: resolve(bundleRoot, "..") });
|
run("zip", ["-qr", archivePath, basename(bundleRoot)], { cwd: resolve(bundleRoot, "..") });
|
||||||
|
|||||||
Reference in New Issue
Block a user