electron / notarize

Notarize your macOS Electron Apps
MIT License
131 stars 32 forks source link

Enhancement: make notarization process optionally asynchronous #149

Open baparham opened 1 year ago

baparham commented 1 year ago

Considering that some of us pay for CI minutes, potentially waiting for hours for notarization to succeed or simply time out could be not so good.

I'm wondering if there's a flow to notarize electron apps where you could package and sign the app, submit it for notarization and retrieve the submission ID from the json results

xcrun notarytool submit test-app.zip --output-format=json <credentials>
{"message":"Successfully uploaded file","path":"...\/test-app.zip","id":"<my submission id here>"}

and then somehow cache the results in some state, and then at a later time perhaps after a quick polling job succeeds, start a new CI job, restore said cache, and give electron/notarize (and in most use cases, electron-packager) the instructions to continue from a cache and just pick up where it left off now that the notarization is done.

The latter half of this plan sounds quite complex, but this is such a strange, asynchronous process that doesn't lend itself well to CI it seems.

Any thoughts?

baparham commented 1 year ago

There is also a --webhook parameter in the notarytool submit command that could be taken advantage of here too.

This makes triggering the followup job potentially easier, but access to a public webhook likely means we're running from a public source repo, aka free CI minutes, so the whole point is rather moot and one may as well just wait in a single job for notarization to complete.

Unless of course we want to have a nicer climate footprint by not just sitting idle waiting for Apple :-)