diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5d0ce0e064a..73ac9bdefe5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,8 +42,9 @@ jobs: shell: bash env: GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }} + APPLE_API_KEY: ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} - APPLE_API_KEY_ISSUER_ID: ${{ secrets.APPLE_API_KEY_ISSUER_ID }} + APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} diff --git a/package.json b/package.json index 23a8fceeb24..128800cf6ff 100755 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "electron": "29.1.0", - "electron-builder": "24.12.0", + "electron-builder": "24.13.3", "@electron/notarize": "2.3.0", "eslint": "8.57.0" }, @@ -190,7 +190,6 @@ { "ext": "uff", "name": "UFF Model" }, { "ext": "xmodel", "name": "Vitis AI Model" } ], - "afterSign": "./publish/notarize.cjs", "publish": [ { "provider": "github", "releaseType": "release" } ], @@ -203,6 +202,7 @@ "darkModeSupport": true, "gatekeeperAssess": false, "hardenedRuntime": true, + "notarize": true, "target": [ "dmg", "zip" ] }, "win": { diff --git a/publish/notarize.cjs b/publish/notarize.cjs deleted file mode 100644 index bd01eacc6c4..00000000000 --- a/publish/notarize.cjs +++ /dev/null @@ -1,24 +0,0 @@ - -const notarize = require('@electron/notarize'); - -exports.default = function (context) { - if (process.platform === 'darwin' && context.electronPlatformName === 'darwin') { - const config = context.packager.info.options.config; - if (process.env.CSC_IDENTITY_AUTO_DISCOVERY !== 'false' && (!config || !config.mac || config.mac.identity !== null)) { - const appId = context.packager.info.config.appId; - const appOutDir = context.appOutDir; - const productFilename = context.packager.appInfo.productFilename; - const APPLE_API_KEY_ID = process.env.APPLE_API_KEY_ID; - const APPLE_API_KEY_ISSUER_ID = process.env.APPLE_API_KEY_ISSUER_ID; - return notarize.notarize({ - tool: 'notarytool', - appBundleId: appId, - appPath: `${appOutDir}/${productFilename}.app`, - appleApiKey: `~/.private_keys/AuthKey_${APPLE_API_KEY_ID}.p8`, - appleApiKeyId: APPLE_API_KEY_ID, - appleApiIssuer: APPLE_API_KEY_ISSUER_ID - }); - } - } - return null; -};