-
Notifications
You must be signed in to change notification settings - Fork 2
build a release
- Building and publishing a complete release
- Building a release for local testing of the bundle
- Building a Linux release
- Building MacOS releases
- Building Windows releases
- Code signing
In order to publish a release you will first need a Github Personal Access Token
in order to push the release to the repo so create one if you don't already have one.
Also, MacOS builds have further requirements so ensure you've read the sections Requirements and DO THIS FIRST.
Then, you can do ./publish.sh
. This will:
- ask you for your apple developer id, app specific password for describo and github personal access token.
- ask if you want to bump the major, minor, patch numbers
- build the 3 distributables and publish each release to the
releases
page of the repository
Once the release is published you then need to verify the draft and release it from the releases page.
You can build a release for testing by simply running one of the following commands (obviously choose the one for your platform)
- Build for linux:
npm run build:linux
- Build for mac:
npm run build:mac
- Build for windows:
npm run build:win
The built executable will be in the dist
folder at the top level.
There are no special requirements to building a linux bundle.
You will need an Apple developer certificate to sign the release as well as an app specific password. To set up the app specfic password follow the instructions at https://support.apple.com/en-au/HT204397
Ensure you have xcode installed as the notarization stage uses a tool called altool
that comes
with xcode full not xcode command line tools.
- export APPLEID= < your apple developer id - you must have an apple developer cert >
- export APPLEIDPASS= < app specific password >
There is a bug in electron-builder where a zip file is required for autoupdate to work but the code to generate
it results in a bundle that doesn't work on Catalina! So, you need to apply the following patch to
node_modules/app-builder-lib/out/targets/ArchiveTarget.js
.
diff --git a/ArchiveTarget.js.orig b/ArchiveTarget.js
index 72a59df..f872592 100644
--- a/ArchiveTarget.js.orig
+++ b/ArchiveTarget.js
@@ -119,9 +119,9 @@ class ArchiveTarget extends _core().Target {
};
await (0, _archive().archive)(format, artifactPath, dirToArchive, archiveOptions);
- if (this.isWriteUpdateInfo && format === "zip") {
- updateInfo = await (0, _differentialUpdateInfoBuilder().appendBlockmap)(artifactPath);
- }
+ //if (this.isWriteUpdateInfo && format === "zip") {
+ //updateInfo = await (0, _differentialUpdateInfoBuilder().appendBlockmap)(artifactPath);
+ //}
}
await packager.info.callArtifactBuildCompleted({
MacOS releases can only be built on MacOS.
Like the MacOS release a developer certificate is required to sign the app but (I think) Windows doesn't stop anyone running an unsigned application.
Also, you'll need docker installed as the Windows build happens inside a docker container.
See https://www.electron.build/code-signing for information about code signing.