From 3c78cfc92bedd1050fc9d3f44531cbec1f72014f Mon Sep 17 00:00:00 2001 From: Viktor Date: Mon, 26 Jun 2023 23:28:49 +0200 Subject: [PATCH] Fix MacOS build error --- .github/workflows/release.yml | 1 + package.json | 3 +-- scripts/notarize.js | 6 +++++- yarn.lock | 28 ++++++++-------------------- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0901c226..32d7265c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,7 @@ jobs: CSC_LINK: ${{ secrets.CSC_LINK }} AC_USERNAME: ${{ secrets.AC_USERNAME }} AC_PASSWORD: ${{ secrets.AC_PASSWORD }} + AC_TEAM_ID: ${{ secrets.AC_TEAM_ID }} GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} steps: diff --git a/package.json b/package.json index 8c542543..332118bc 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "@babel/plugin-transform-runtime": "^7.4.3", "@babel/preset-env": "^7.4.3", "@babel/preset-react": "^7.0.0", + "@electron/notarize": "^2.0.0", "@getstation/time-require": "^1.0.0", "@graphql-codegen/cli": "1.3.1", "@graphql-codegen/typescript": "1.3.1", @@ -160,8 +161,6 @@ "electron": "^24", "electron-builder": "23.6.0", "electron-mocha": "^8.1.0", - "electron-notarize": "^1.0.0", - "electron-osx-sign": "^0.4.10", "electron-webpack": "^2.8.2", "electron-winstaller": "^2.6.4", "eslint": "^4.18.2", diff --git a/scripts/notarize.js b/scripts/notarize.js index 9eaf9fd5..b03fbb20 100644 --- a/scripts/notarize.js +++ b/scripts/notarize.js @@ -1,5 +1,5 @@ require('dotenv').config(); -const { notarize } = require('electron-notarize'); +const { notarize } = require('@electron/notarize'); exports.default = async function notarizing(context) { const { electronPlatformName, appOutDir } = context; @@ -17,5 +17,9 @@ exports.default = async function notarizing(context) { appPath: `${appOutDir}/${productFilename}.app`, appleId: process.env.AC_USERNAME, appleIdPassword: process.env.AC_PASSWORD, + // to find AC_TEAM_ID run + // xcrun altool --list-providers -u -p + // AC_TEAM_ID=ProviderShortname from the output + teamId: process.env.AC_TEAM_ID, }); }; diff --git a/yarn.lock b/yarn.lock index 5fac4762..021201b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2397,6 +2397,14 @@ optionalDependencies: global-agent "^3.0.0" +"@electron/notarize@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.0.0.tgz#4df39e817264746aa9bd779e0091b6c441715b72" + integrity sha512-dqDpd2YCgl6PHJgXEuKGYH3+L4GIGV7ZbKYJjJv66ed+hVPxZA+GAL5JH8/hCnoyQa8WzJTzqd+qhiL5Oxr+SA== + dependencies: + debug "^4.1.1" + fs-extra "^9.0.1" + "@electron/remote@^2.0.9": version "2.0.9" resolved "https://registry.yarnpkg.com/@electron/remote/-/remote-2.0.9.tgz#092ff085407bc907f45b89a72c36faa773ccf2d9" @@ -10676,26 +10684,6 @@ electron-mocha@^8.1.0: which "^1.3.1" yargs "^13.3.0" -electron-notarize@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-1.0.0.tgz#bc925b1ccc3f79e58e029e8c4706572b01a9fd8f" - integrity sha512-dsib1IAquMn0onCrNMJ6gtEIZn/azG8hZMCYOuZIMVMUeRMgBYHK1s5TK9P8xAcrAjh/2aN5WYHzgVSWX314og== - dependencies: - debug "^4.1.1" - fs-extra "^9.0.1" - -electron-osx-sign@^0.4.10: - version "0.4.11" - resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.11.tgz#8377732fe7b207969f264b67582ee47029ce092f" - integrity sha512-VVd40nrnVqymvFrY9ZkOYgHJOvexHHYTR3di/SN+mjJ0OWhR1I8BRVj3U+Yamw6hnkZZNKZp52rqL5EFAAPFkQ== - dependencies: - bluebird "^3.5.0" - compare-version "^0.1.2" - debug "^2.6.8" - isbinaryfile "^3.0.2" - minimist "^1.2.0" - plist "^3.0.1" - electron-osx-sign@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.6.0.tgz#9b69c191d471d9458ef5b1e4fdd52baa059f1bb8"