Browse Source

fixed signing

Eugene 3 days ago
parent
commit
34c0c780f4
2 changed files with 13 additions and 4 deletions
  1. 4 1
      .github/workflows/build.yml
  2. 9 3
      scripts/build-windows.mjs

+ 4 - 1
.github/workflows/build.yml

@@ -320,8 +320,10 @@ jobs:
         fetch-depth: 0
 
     - name: Code signing with Software Trust Manager
-      uses: digicert/ssm-code-signing@v1.0.0
+      uses: digicert/ssm-code-signing@v1.1.1
       if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags'))
+      env:
+        FORCE_DOWNLOAD_TOOLS: 'true'
 
     - name: Installing Node
       uses: actions/[email protected]
@@ -372,6 +374,7 @@ jobs:
         # not used but necessary for electron-builder to run
         $env:WIN_CSC_LINK=$env:SM_CLIENT_CERT_FILE
         $env:WIN_CSC_KEY_PASSWORD=$env:SM_CLIENT_CERT_PASSWORD
+
         node scripts/build-windows.mjs
       env:
         ARCH: ${{matrix.arch}}

+ 9 - 3
scripts/build-windows.mjs

@@ -36,15 +36,21 @@ builder({
                     console.log('Signing', configuration)
                     if (configuration.path) {
                         try {
-                            const out = execSync(
-                                `smctl sign --keypair-alias=${keypair} --input "${String(configuration.path)}"`
-                            )
+                            const cmd = `smctl sign --keypair-alias=${keypair} --input "${String(configuration.path)}"`
+                            console.log(cmd)
+                            const out = execSync(cmd)
                             if (out.toString().includes('FAILED')) {
                                 throw new Error(out.toString())
                             }
                             console.log(out.toString())
                         } catch (e) {
                             console.error(`Failed to sign ${configuration.path}`)
+                            if (e.stdout) {
+                                console.error('stdout:', e.stdout.toString())
+                            }
+                            if (e.stderr) {
+                                console.error('stderr:', e.stderr.toString())
+                            }
                             console.error(e)
                             process.exit(1)
                         }