Skip to content

Commit 34c0c78

Browse files
committed
fixed signing
1 parent de65a72 commit 34c0c78

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,10 @@ jobs:
320320
fetch-depth: 0
321321

322322
- name: Code signing with Software Trust Manager
323-
uses: digicert/ssm-code-signing@v1.0.0
323+
uses: digicert/ssm-code-signing@v1.1.1
324324
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags'))
325+
env:
326+
FORCE_DOWNLOAD_TOOLS: 'true'
325327

326328
- name: Installing Node
327329
uses: actions/setup-node@v4.4.0
@@ -372,6 +374,7 @@ jobs:
372374
# not used but necessary for electron-builder to run
373375
$env:WIN_CSC_LINK=$env:SM_CLIENT_CERT_FILE
374376
$env:WIN_CSC_KEY_PASSWORD=$env:SM_CLIENT_CERT_PASSWORD
377+
375378
node scripts/build-windows.mjs
376379
env:
377380
ARCH: ${{matrix.arch}}

scripts/build-windows.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,21 @@ builder({
3636
console.log('Signing', configuration)
3737
if (configuration.path) {
3838
try {
39-
const out = execSync(
40-
`smctl sign --keypair-alias=${keypair} --input "${String(configuration.path)}"`
41-
)
39+
const cmd = `smctl sign --keypair-alias=${keypair} --input "${String(configuration.path)}"`
40+
console.log(cmd)
41+
const out = execSync(cmd)
4242
if (out.toString().includes('FAILED')) {
4343
throw new Error(out.toString())
4444
}
4545
console.log(out.toString())
4646
} catch (e) {
4747
console.error(`Failed to sign ${configuration.path}`)
48+
if (e.stdout) {
49+
console.error('stdout:', e.stdout.toString())
50+
}
51+
if (e.stderr) {
52+
console.error('stderr:', e.stderr.toString())
53+
}
4854
console.error(e)
4955
process.exit(1)
5056
}

0 commit comments

Comments
 (0)