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

GitHub Actions workflow to build and sign macOS binary executables #1171

Open
simonw opened this issue Jan 4, 2021 · 8 comments
Open

GitHub Actions workflow to build and sign macOS binary executables #1171

simonw opened this issue Jan 4, 2021 · 8 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented Jan 4, 2021

Using PyInstaller, as explored in #93 and https://til.simonwillison.net/python/packaging-pyinstaller

The bigger challenge will be the code signing bit. I'll need a Apple Developer account ($99/year) and some extensive CI fiddling.

@simonw simonw added the ci label Jan 4, 2021
@simonw
Copy link
Owner Author

simonw commented Jan 4, 2021

actions/runner-images#1820 (comment) looks useful - not sure if those notes are for iOS or macOS though.

@simonw
Copy link
Owner Author

simonw commented Jan 4, 2021

@simonw
Copy link
Owner Author

simonw commented Jan 4, 2021

This looks VERY useful: https://github.com/mitchellh/gon - " Sign, notarize, and package macOS CLI tools and applications written in any language. Available as both a CLI and a Go library."

And it installs like this:

brew install mitchellh/gon/gon

@simonw
Copy link
Owner Author

simonw commented Jan 4, 2021

Bit uncomfortable that it looks like you need to include your Apple ID username and password in the CI configuration to do this. I'll use GitHub Secrets for this but I don't like it - I'll definitely setup a dedicated code signing account that's not my access-to-everything AppleID for this.

@rcoup
Copy link

rcoup commented Jan 5, 2021

We did this for Sno under macOS — it's a PyInstaller binary/setup which uses Packages for packaging.

FYI (if you ever get to it) for Windows you need to get a code signing certificate. And if you want automated CI, you'll want to get an "EV CodeSigning for HSM" certificate from GlobalSign, which then lets you put the certificate into Azure Key Vault. Which you can use with azuresigntool to sign your code & installer. (Non-EV certificates are a waste of time, the user still gets big warnings at install time).

@simonw
Copy link
Owner Author

simonw commented Jan 5, 2021

That's really useful, thanks @rcoup

@simonw
Copy link
Owner Author

simonw commented Jan 7, 2021

I requested a D-U-N-S number as a first step in getting a developer certificate: https://developer.apple.com/support/D-U-N-S/

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

No branches or pull requests

2 participants