这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@chchwy
Copy link
Member

@chchwy chchwy commented Aug 21, 2025

Hi all, this PR implements macOS code signing and notarization in the GitHub Action when creating the Pencil2D macOS app.

Issue: #1922

This ensures we meet Apple's security requirements and provide a better user experience, particularly to avoid the very annoying security warning.

This codesign & notarization process requires 6 GitHub actions secrets to work. I have added them to our repo.

If you don't have them, don't worry the notarization step will be skipped, and it will just work the same as before.


For anyone who wants to code-sign the app with your own Apple developer account, you need to

  1. Go to Apple Developer website and request a "Developer ID Application" certificate
  2. Download and install the certificate to your local Keychain Access
  3. Open Keychain Access and export the private key as a .p12 file, with a custom password
  4. Convert the .p12 file to a Base64 string

And then set the following GitHub Action secrets

  1. P12_BASE64: the private key base64 text you just export above
  2. P12_PASSWORD: the custom password you set when you export the .p12 private key
  3. APPLE_ID: your Apple Developer account email
  4. APPLE_ID_PASSWORD: This is the "App-specific password", not the password you use to log into your Apple Developer account. Please request one on the developer website.
  5. APPLE_TEAM_ID: type the security command below to find it
  6. CODESIGN_CERT_IDENTITY: type the security command below to find it

security find-identity -v -p codesigning
it will print out something like this:

1) YOUR_CERTIFICATE_IDENTITY "Developer ID Application: Your-Name (TEAM_ID)"

Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my own experience signing apps, it should be possible to simplify the codesign scripting parts a bit but aside from that, the setup looks good to me.

@github-project-automation github-project-automation bot moved this from Needs Review to Approved in Pull Request Priority Aug 25, 2025
@chchwy chchwy force-pushed the feat/mac-notarize branch from a1744cc to b524ba0 Compare August 27, 2025 16:14
@chchwy chchwy force-pushed the feat/mac-notarize branch from b524ba0 to 54e2d87 Compare August 27, 2025 16:30
@chchwy
Copy link
Member Author

chchwy commented Aug 27, 2025

Thank you @MrStevns for reviewing my PR. I am going to merge it.

@chchwy chchwy merged commit 8705898 into pencil2d:release/0.7.1 Aug 27, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Pull Request Priority Aug 27, 2025
chchwy added a commit to chchwy/pencil2d that referenced this pull request Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants