Fix Windows runtime packaging
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.1.22 - 2026-03-10
|
||||||
|
### Fixed
|
||||||
|
- Fixed the Windows desktop release runtime builder to package managed-runtime workspaces without relying on a fragile `npm pack` shell invocation in GitHub Actions.
|
||||||
|
|
||||||
## 0.1.21 - 2026-03-10
|
## 0.1.21 - 2026-03-10
|
||||||
### Improved
|
### Improved
|
||||||
- Improved desktop release reliability by fixing the Windows managed-runtime build path during GitHub Actions releases.
|
- Improved desktop release reliability by fixing the Windows managed-runtime build path during GitHub Actions releases.
|
||||||
|
|||||||
@@ -196,10 +196,13 @@ function runCommand(command, args, options = {}) {
|
|||||||
encoding: "utf8",
|
encoding: "utf8",
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
if (result.status !== 0) {
|
if (result.status !== 0 || result.error) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
[
|
[
|
||||||
`Command failed: ${command} ${args.join(" ")}`,
|
`Command failed: ${command} ${args.join(" ")}`,
|
||||||
|
result.error ? String(result.error) : null,
|
||||||
|
result.signal ? `signal: ${result.signal}` : null,
|
||||||
|
result.status != null ? `exit code: ${result.status}` : null,
|
||||||
result.stdout?.trim(),
|
result.stdout?.trim(),
|
||||||
result.stderr?.trim(),
|
result.stderr?.trim(),
|
||||||
]
|
]
|
||||||
@@ -245,7 +248,17 @@ async function ensureWorkspaceBuilds() {
|
|||||||
|
|
||||||
async function packWorkspace(packageRoot, tarballRoot) {
|
async function packWorkspace(packageRoot, tarballRoot) {
|
||||||
await ensureDir(tarballRoot);
|
await ensureDir(tarballRoot);
|
||||||
const result = runCommand("npm", ["pack", "--json", "--pack-destination", tarballRoot], {
|
const npmExecPath = process.env.npm_execpath;
|
||||||
|
if (!npmExecPath) {
|
||||||
|
throw new Error("Missing npm_execpath while building managed runtime.");
|
||||||
|
}
|
||||||
|
const result = runCommand(process.execPath, [
|
||||||
|
npmExecPath,
|
||||||
|
"pack",
|
||||||
|
"--json",
|
||||||
|
"--pack-destination",
|
||||||
|
tarballRoot,
|
||||||
|
], {
|
||||||
cwd: packageRoot,
|
cwd: packageRoot,
|
||||||
});
|
});
|
||||||
const [{ filename }] = JSON.parse(result.stdout.trim());
|
const [{ filename }] = JSON.parse(result.stdout.trim());
|
||||||
|
|||||||
Reference in New Issue
Block a user