pull/355/head
unknown 2024-04-08 22:40:59 +02:00
rodzic a77a99023f
commit f3316da6dc
2 zmienionych plików z 17 dodań i 11 usunięć

Wyświetl plik

@ -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 }}

Wyświetl plik

@ -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`)
}