Skip to content

Commit

Permalink
deps(mac): allow mac signing with password-less cert and update to cu…
Browse files Browse the repository at this point in the history
…rrent electron/notarize (#982)

* deps: update to current electron/notarize to fix notarization issues

* ci: support password-less cert

---------

Co-authored-by: Saúl Ibarra Corretgé <[email protected]>
  • Loading branch information
csett86 and saghul authored Oct 4, 2024
1 parent aef6f8a commit 172835b
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 105 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
node-version: '20'
- name: Prepare for app signing and notarization
env:
MAC_CERT_PASSWORD: ${{ secrets.mac_cert_password }}
if: ${{ env.MAC_CERT_PASSWORD }}
MAC_CERT: ${{ secrets.mac_cert }}
if: ${{ env.MAC_CERT }}
run: |
echo "CSC_LINK=${{ secrets.mac_cert }}" >> $GITHUB_ENV
echo "CSC_KEY_PASSWORD=${{ secrets.mac_cert_password }}" >> $GITHUB_ENV
Expand Down
7 changes: 1 addition & 6 deletions notarize.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { notarize } = require('electron-notarize');
const { notarize } = require('@electron/notarize');
const process = require('process');
const pkgJson = require('./package.json');

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
Expand All @@ -16,8 +15,6 @@ exports.default = async function notarizing(context) {
console.log(`Notarizing ${appPath} with user & password`);

return await notarize({
tool: 'notarytool',
appBundleId: pkgJson.build.appId,
appPath,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD,
Expand All @@ -27,8 +24,6 @@ exports.default = async function notarizing(context) {
console.log(`Notarizing ${appPath} with API key`);

return await notarize({
tool: 'notarytool',
appBundleId: pkgJson.build.appId,
appPath,
appleApiKey: process.env.API_KEY_FILE,
appleApiKeyId: process.env.API_KEY_ID,
Expand Down
160 changes: 64 additions & 96 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
"@babel/preset-env": "^7.16.11",
"@babel/preset-flow": "^7.16.7",
"@babel/preset-react": "^7.16.7",
"@electron/notarize": "2.4.0",
"@hapi/bourne": "^3.0.0",
"@jitsi/js-utils": "2.0.5",
"@svgr/webpack": "^6.2.1",
Expand All @@ -185,7 +186,6 @@
"electron-context-menu": "^2.5.0",
"electron-is-dev": "^1.2.0",
"electron-log": "^4.3.2",
"electron-notarize": "1.1.1",
"electron-react-devtools": "0.5.3",
"electron-updater": "5.0.5",
"electron-window-state": "^5.0.3",
Expand Down

0 comments on commit 172835b

Please sign in to comment.