kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
Work on #321
rodzic
a77a99023f
commit
f3316da6dc
|
@ -82,7 +82,7 @@ jobs:
|
|||
debugElectron: false
|
||||
env:
|
||||
# new MacOS notarize secrets (2024)
|
||||
DEBUG: electron-builder
|
||||
DEBUG: electron-builder # To debug electron-builder
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
|
|
26
signWin.js
26
signWin.js
|
@ -2,24 +2,30 @@ const {
|
|||
execSync
|
||||
} = require('node:child_process')
|
||||
|
||||
console.info(`signing with SignWin`)
|
||||
|
||||
exports.default = async configuration => {
|
||||
if (!process.env.SM_API_KEY) {
|
||||
console.info(`Skip signing because SM_API_KEY and not configured`)
|
||||
console.error("Signing using OpenBuilds CONTROL's custom signWin.js script: failed: SM_API_KEY ENV VAR NOT FOUND");
|
||||
return
|
||||
}
|
||||
|
||||
if (!process.env.SM_CODE_SIGNING_CERT_SHA1_HASH) {
|
||||
console.error("Signing using OpenBuilds CONTROL's custom signWin.js script: failed: FINGERPRINT ENV VAR NOT FOUND");
|
||||
return
|
||||
}
|
||||
|
||||
if (!configuration.path) {
|
||||
throw new Error(`Path of application is not found`)
|
||||
throw new Error(`Signing using OpenBuilds CONTROL's custom signWin.js script: failed: TARGET PATH NOT FOUND`)
|
||||
return
|
||||
}
|
||||
|
||||
//signtool.exe sign /sha1 ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }} /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 "D:\a\OpenBuilds-CONTROL\OpenBuilds-CONTROL\dist\*.exe"
|
||||
//signtool.exe verify /v /pa "D:\a\OpenBuilds-CONTROL\OpenBuilds-CONTROL\dist\*.exe"
|
||||
try {
|
||||
execSync(`smctl sign --fingerprint="${process.env.SM_CODE_SIGNING_CERT_SHA1_HASH}" --input "${String(configuration.path)}"`, {
|
||||
stdio: 'inherit',
|
||||
})
|
||||
console.log("Signing using OpenBuilds CONTROL's custom signWin.js script: successful");
|
||||
} catch (error) {
|
||||
console.error("Signing using OpenBuilds CONTROL's custom signWin.js script: failed:", error);
|
||||
}
|
||||
|
||||
execSync(`smctl sign --fingerprint="${process.env.SM_CODE_SIGNING_CERT_SHA1_HASH}" --input "${String(configuration.path)}"`, {
|
||||
stdio: 'inherit',
|
||||
})
|
||||
console.info(`signed with SignWin`)
|
||||
|
||||
}
|
Ładowanie…
Reference in New Issue