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/package.json b/package.json index 91065e465..e23f24aee 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "cbor2": "^1.2.2", "date-fns": "^3.3.1", "electron": "^28.2.2", - "electron-builder": "^24.9.1", + "electron-builder": "24.13.3", "electron-devtools-installer": "^3.2.0", "electron-updater": "^6.1.8", "element-plus": "^2.5.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a9007019c..d67eaf596 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,7 +63,7 @@ devDependencies: specifier: ^28.2.2 version: 28.2.6 electron-builder: - specifier: ^24.9.1 + specifier: 24.13.3 version: 24.13.3(electron-builder-squirrel-windows@24.13.3) electron-devtools-installer: specifier: ^3.2.0 @@ -3285,6 +3285,7 @@ packages: /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + requiresBuild: true dependencies: base64-js: 1.5.1 ieee754: 1.2.1 @@ -6456,7 +6457,7 @@ packages: engines: {node: '>= 6'} dependencies: inherits: 2.0.4 - string_decoder: 1.3.0 + string_decoder: 1.1.1 util-deprecate: 1.0.2 dev: true @@ -7020,12 +7021,6 @@ packages: safe-buffer: 5.1.2 dev: true - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - dependencies: - safe-buffer: 5.2.1 - dev: true - /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} diff --git a/scripts/notarize.js b/scripts/notarize.cjs similarity index 58% rename from scripts/notarize.js rename to scripts/notarize.cjs index 1c2f5bfa6..f2ca75623 100644 --- a/scripts/notarize.js +++ b/scripts/notarize.cjs @@ -1,29 +1,18 @@ require('dotenv').config() -import { notarize } from '@electron/notarize' +const { notarize } = require('@electron/notarize') exports.default = async function notarizing(context) { const { electronPlatformName, appOutDir } = context - - // skip notarization for no macOS platforms if (electronPlatformName !== 'darwin') { return } - // Skip notarization when SIGN env is false - if ( - !process.env.SIGN || - process.env.SIGN === 'false' || - process.env.SIGN === '0' - ) { - return - } - 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, }) }