Automatic building of session binaries is done using github actions. Windows and linux binaries will build right out of the box but there are some extra steps needed for Mac OS
The build script for Mac OS requires you to have a valid Developer ID Application
certificate. Without this the build script cannot sign and notarize the mac binary which is needed for Catalina 10.15 and above.
If you would like to disable this then comment out "afterSign": "build/notarize.js",
in package.json.
You will also need an App-specific password for the apple account you wish to notarize with
Once you have your Developer ID Application
you need to export it into a .p12
file. Keep a note of the password used to encrypt this file as it will be needed later.
We need to Base64 encode this file, so run the following command:
base64 -i certificate.p12 -o encoded.txt
- Navigate to the main page of the repository.
- Under your repository name, click Settings.
- In the left sidebar, click Secrets.
- Add the following secrets:
- Certificate
- Name:
MAC_CERTIFICATE
- Value: The encoded Base64 certificate
- Name:
- Certificate password
- Name:
MAC_CERTIFICATE_PASSWORD
- Value: The password that was set when the certificate was exported.
- Name:
- Apple ID
- Name:
SIGNING_APPLE_ID
- Value: The apple id (email) to use for signing
- Name:
- Apple Password
- Name:
SIGNING_APP_PASSWORD
- Value: The app-specific password that was generated for the apple id
- Name:
- Team ID (Optional)
- Name:
SIGNING_TEAM_ID
- Value: The apple team id if you're sigining the application for a team
- Name:
- Certificate
You will need node 10.13.0
.
This can be done by using nvm and running nvm use
or you can install it manually.
Windows
Building on windows should work straight out of the box, but if it fails then you will need to run the following:
npm install --global --production [email protected]
npm install --global node-gyp@latest
npm config set python python2.7
npm config set msvs_version 2015
Mac
If you are going to distribute the binary then make sure you have a Developer ID Application
certificate in your keychain.
You will then need to generate an app specific password for your Apple ID.
Then run the following to export the variables
export SIGNING_APPLE_ID=<your apple id>
export SIGNING_APP_PASSWORD=<your app specific password>
export SIGNING_TEAM_ID=<your team id if applicable>
Run the following to build the binaries for your specific system OS.
npm install yarn --no-save
yarn install --frozen-lockfile
yarn generate
yarn build-release
The binaries will be placed inside the release/
folder.