Skip to content

Automate MacOS Code-Signing in CICD #253

@CMCDragonkai

Description

@CMCDragonkai

Specification

During the integration stage, the final macos executables must be code-signed and notarised in order for them to be a drop-in runnable on end-user systems. This is the case even for applications distributed outside of the app store.

I have succesfully done this manually inside the matrix-mac-1. However this should be done by our CICD during integration:macos job before we do a prerelease or release.

The exact process of doing this may change if we were to integrate Nix: MatrixAI/TypeScript-Demo-Lib-Native#1. In this case, it would be better to have the Nix produce the final output, and have the code signing and notarisation part of the Nix process. However notarisation involves contacting the Apple mothership, and this may mean we require an "impure" build shell which basically means disabling the sandbox.

Additional context

  • WIP: Demonstrating Native Addons TypeScript-Demo-Lib#38 (comment) - initial manual work doing code-signing and notarisation
  • WIP: Demonstrating Native Addons TypeScript-Demo-Lib#38 (comment) - additional resources on how to automate this into our CICD
    • macos runners have passwordless sudo, however the keychain password is entirely different, we don't know what the main keychain password is, however it appears we can use a temporary keychain and not require to know the login keychain password
  • We will need to inject our Developer ID Application key and certificate into our CICD system, this must be a protected variable
  • We will continue to use the zip format, but if the pkg format allows to staple the notarization onto the executable, then it should be investigated further, because we could also release the pkg format, while having the bare executable around

Tasks

  1. ...
  2. ...
  3. ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions