-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Get an Apple developer certificate #45
Comments
My main AppleID is still associated with a UK developer account which expired in 2015 - and when I tried to submit the form with a request to update my address I got a 404 error! So I created a brand new AppleID with my US address (details in my 1Password) and spent $99 enrolling that new ID in the Apple Developer program. It says it could take up to 48 hours for that to be processed, so I can't create a certificate with it until that happens. |
Account is active! Next step: figure out which of these I need: https://developer.apple.com/account/resources/certificates/add |
For the first release I'm ignoring the Mac App Store entirely, so the Electron docs say I need: https://github.com/electron/electron-osx-sign/wiki/1.-Getting-Started#certificates
|
Since I plan to distribute as a zip file and not a DMG (see #33) maybe I don't need the Installer one? |
I'm going to use that form to create a "Developer ID Application" certificate. It wants a certificate signing request: https://help.apple.com/developer-account/#/devbfa00fef7
|
I'm deliberately NOT importing the certificate into Keychain, because I want to figure out how to use it in a GitHub Actions workflow exclusively using the command-line. |
GitHub secrets are limited to 64KB so this will work fine. I'll probably base64 encode it. This outputs the base64 for that file:
|
I think I may need to use All of the instructions out there such as https://stackoverflow.com/a/28962937/6083 encourage using the Keychain Access application to do this, but I don't want to! I'll continue trying to figure out how to do it on the command-line. I may have to give up and use the GUI though. |
https://stackoverflow.com/questions/21141215/creating-a-p12-file looks relevant but I'm now wary that I didn't select any kind of private key when I got Keychain Access to create the CSR for me - so I think it hid those details. https://stackoverflow.com/a/28962937/6083 says:
So I'm going to stop going down this rabbit hole and just use Keychain Acess to create the p12 file I need, following those Stack Overflow instructions. |
I double-clicked I clicked "Add". I think I need to export two files as one. I found this option in the "Certificates" pane in Keychain Access: Then it asked me for a place to save the file - I decided on a file name of Then it asked me for a password - I generated a random one and stored it in 1Password item called "Password for Developer-ID-Application-Certificates.p12" It asked for my login keychain password: |
I now have a 3KB |
OK, this looks like it might be working!
|
Having run that I ran this:
This gave me a |
It looks like this works too:
So I can stash the base64 of that file in a GitHub Actions secret and use it directly from the command-line. |
I added |
Let's see what happens! |
That workflow run is here: https://github.com/simonw/datasette-app/runs/3509435955 Looks like it's doing the right thing:
|
I'm going to call this done, and move on to a new issue for notarizing. |
Turned this all into a TIL: https://til.simonwillison.net/electron/sign-notarize-electron-macos |
Part of #20
The text was updated successfully, but these errors were encountered: