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

ci: add release and notarize process #7

Merged
merged 1 commit into from
Mar 8, 2022
Merged

Conversation

n8maninger
Copy link
Member

@n8maninger n8maninger commented Feb 23, 2022

Adds a release step to the build process with notarization for the Apple releases.

notarize.sh signs and notarizes the binaries. The binary will run when started from Terminal, but double-clicking on it will prompt the user with a different message "the identity of the developer cannot be verified." I couldn't find anything recent, but this looks like an Apple issue with how Gatekeeper works in Finder. It's possible using a dmg package instead of zip would help. We might want to do some more research on this.

We need to add a couple of secrets to the repo, I don't have access to the Apple developer account or GitHub secrets, so @lukechampine will probably need to generate and add them.

Apple API

  • secrets.APPLE_API_KEY: the ten character ID of the API key to use, we can generate API keys on https://appstoreconnect.apple.com/access/api.
  • secrets.APPLE_API_ISSUER: the issuer ID at the top of the API key page
    +secrets.APPLE_KEY_B64: the base64 encoded API key. Download the key when creating it, then base64 -i ~/AuthKey_12345678.p8

Apple Developer Certificate:

  • secrets.APPLE_CERT_ID: the fingerprint of the "Developer ID Application" cert. It can be found by running security find-identity -v. We should generate a unique cert for CI signing.
  • secrets.APPLE_CERT_B64: the base64 encoded certificate to use for signing, export the certificate from XCode, then run base64 -i ~/dev-cert.pem
  • secrets.APPLE_CERT_PASSWORD: the password used when exporting the certificate from XCode
  • secrets.APPLE_KEYCHAIN_PASSWORD: a random password used to unlock the CI keychain.

@lukechampine
Copy link
Member

ok, I've added the API secrets. Will add the dev certs soon

@lukechampine
Copy link
Member

added the other secrets. Not sure I followed all the steps correctly...is there an easy way we can test it? What guide did you get this info from?

@n8maninger
Copy link
Member Author

added the other secrets. Not sure I followed all the steps correctly...is there an easy way we can test it? What guide did you get this info from?

We'll have to merge it to run it. Once it's merged we can trigger the workflow manually.

@lukechampine lukechampine merged commit 0e23a64 into master Mar 8, 2022
@lukechampine
Copy link
Member

looks like the build failed because the .p8 path in release.sh is hardcoded

@n8maninger
Copy link
Member Author

Yeah, that line should be xcrun notarytool submit --key ~/private_keys/AuthKey_$APPLE_API_KEY.p8 -d $APPLE_API_KEY -i $APPLE_API_ISSUER --wait --timeout 10m $ZIP_OUTPUT

@n8maninger
Copy link
Member Author

n8maninger commented Mar 8, 2022

I pushed the fix directly to master

@n8maninger n8maninger deleted the ci-add-release branch March 8, 2022 03:04
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 this pull request may close these issues.

2 participants