This document alongside Releasing.md primarily covers our internal build process for release builds.
If you are an external contributor please refer to Contributing.md for building instructions.
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
Mac
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:
Name Value MAC_CERTIFICATE
The encoded Base64 certificate MAC_CERTIFICATE_PASSWORD
The password that was set when the certificate was exported SIGNING_APPLE_ID
The apple id (email) to use for signing SIGNING_APP_PASSWORD
The app-specific password that was generated for the apple id SIGNING_TEAM_ID
OPTIONAL The apple team id if you're signing the application for a team
Follow the instructions in Contributing.md to set up your development environment.
Linux
The rpm package is required for running the build-release script on Linux. Run the appropriate command to install the rpm
package:
sudo pacman -S rpm # Arch
sudo apt install rpm # Ubuntu/Debian
Mac
If you are going (and only if) to distribute the binary then make sure you have a Developer ID Application
certificate in your keychain. Without this the build script cannot sign and notarize the mac binary which is needed for Catalina 10.15 and above.
You will also need an App-specific password for the apple account you wish to notarize with
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>
Once your development environment is set up, here are the steps to build the application:
yarn install --frozen-lockfile # install all dependencies of this project
yarn build-everything # transpile and assemble files
yarn build-release
The binaries will be placed inside the release/
folder.
Linux
You can change in package.json "target": ["deb"],
to any of the electron-builder targets to build for another target.