Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/desktop-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
steps:
- uses: actions/checkout@v5
with:
ref: ${{ env.VERSION }}
ref: ${{ github.ref_name }}

- uses: actions/setup-node@v5
with:
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
steps:
- uses: actions/checkout@v5
with:
ref: ${{ env.VERSION }}
ref: ${{ github.ref_name }}

- uses: actions/setup-node@v5
with:
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"build": {
"appId": "dev.specdock.app",
"productName": "SpecDock",
"executableName": "specdock",
"icon": "build/icon.png",
"directories": {
"output": "release/desktop"
Expand Down
20 changes: 19 additions & 1 deletion apps/desktop/scripts/package.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@ import { spawn } from "node:child_process";

const target = process.argv[2] ?? "--dir";
const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
const builderArgs = target === "--dir" ? ["electron-builder", "--dir"] : ["electron-builder", target];
const builderArgs =
target === "--dir"
? ["electron-builder", "--dir", "--publish", "never"]
: ["electron-builder", target, "--publish", "never"];
const emptySigningEnvNames = [
"CSC_LINK",
"CSC_NAME",
"CSC_KEY_PASSWORD",
"WIN_CSC_LINK",
"WIN_CSC_KEY_PASSWORD",
"APPLE_API_KEY",
"APPLE_API_KEY_ID",
"APPLE_API_ISSUER"
];
const hasSigningConfig =
process.env.CSC_LINK ||
process.env.CSC_NAME ||
Expand All @@ -21,6 +34,11 @@ function run(command, args, extraEnv = {}) {
};

delete env.ELECTRON_RUN_AS_NODE;
for (const name of emptySigningEnvNames) {
if (env[name] === "") {
delete env[name];
}
}

const child = spawn(command, args, {
env,
Expand Down