From 6a628ef8d38de60cd8535e81b4c594c56150cea2 Mon Sep 17 00:00:00 2001 From: gabaldon Date: Tue, 2 Apr 2024 11:08:34 +0200 Subject: [PATCH] fix: update electron builder config --- .github/workflows/release.yaml | 1 + electron-builder.json5 | 1 + scripts/{notarize.js => notarize.cjs} | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) rename scripts/{notarize.js => notarize.cjs} (84%) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 13369e4bc..7778b6b27 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,6 +41,7 @@ jobs: # macOS notarization API key APPLEID: ${{ secrets.APPLEID }} APPLEIDPASS: ${{ secrets.APPLEIDPASSWORD }} + APPLETEAMID: ${{ secrets.APPLETEAMID }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SIGN: true run: | diff --git a/electron-builder.json5 b/electron-builder.json5 index 53c14ab66..a02272d50 100644 --- a/electron-builder.json5 +++ b/electron-builder.json5 @@ -17,6 +17,7 @@ "default" ] }, + "afterSign": "scripts/notarize.cjs", "win": { "target": [ { diff --git a/scripts/notarize.js b/scripts/notarize.cjs similarity index 84% rename from scripts/notarize.js rename to scripts/notarize.cjs index 1c2f5bfa6..23b9408f0 100644 --- a/scripts/notarize.js +++ b/scripts/notarize.cjs @@ -1,5 +1,5 @@ require('dotenv').config() -import { notarize } from '@electron/notarize' +const { notarize } = require('@electron/notarize') exports.default = async function notarizing(context) { const { electronPlatformName, appOutDir } = context @@ -19,11 +19,11 @@ exports.default = async function notarizing(context) { } const appName = context.packager.appInfo.productFilename - return await notarize({ - appBundleId: 'io.witnet.sheikah', + tool: 'notarytool', appPath: `${appOutDir}/${appName}.app`, appleId: process.env.APPLEID, appleIdPassword: process.env.APPLEIDPASS, + teamId: process.env.APPLETEAMID, }) }