Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make keychain optional for macOS notarizing #8015

Closed
MaartenBent opened this issue Jan 29, 2024 · 1 comment · Fixed by #8022
Closed

Make keychain optional for macOS notarizing #8015

MaartenBent opened this issue Jan 29, 2024 · 1 comment · Fixed by #8022

Comments

@MaartenBent
Copy link

  • Electron-Builder Version: 24.9.1
  • Node Version: 21.5
  • Electron Version: 28.2
  • Electron Type (current, beta, nightly): current
  • Target: macOS arm64

I want to notarize using electron-builder built-in notarize feature.

Previously I successfully used afterSign and manually notarized using electron-notarize. I only provide the keychainProfile, no keychain. Because with an empty keychain it allows to use the iCloud keychain.

From the electron-notarize docs:

  • ... or keychain with keychainProfile:
    * keychain String (optional) - The name of the keychain or path to the keychain you stored notarization credentials in. If omitted, iCloud keychain is used by default.
    * keychainProfile String - The name of the profile you provided when storing notarization credentials.
await notarize.notarize({
    tool: 'notarytool',
    appPath: appPath,
    keychainProfile: 'AC_PASSWORD',
});

Currently electron-builder requires to set the APPLE_KEYCHAIN envvar and forces to use a keychain. I would like this to become an optional parameter. And only require APPLE_KEYCHAIN_PROFILE. Relevant code:

// option 3: keychain
const keychain = process.env.APPLE_KEYCHAIN
const keychainProfile = process.env.APPLE_KEYCHAIN_PROFILE
if (keychain && keychainProfile) {
return this.generateNotarizeOptions(appPath, undefined, { keychain, keychainProfile })
}

Thank you.

@mmaietta
Copy link
Collaborator

Great callout and thanks for the code pointers as well. I've updated the code and it will be in our next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants