We are using https://www.electron.build/ to publish releases via Github Actions.
We have to update two versions in two package.jsons.
We have a helper script so run the following commands.
IMPORTANT: You need to have clean git status (no unstaged changes etc.).
New alpha release:
npm run version:alpha:pre
npm run version:alpha:preminor
npm run version:alpha:prepathNew beta release:
npm run version:beta:pre
npm run version:beta:preminor
npm run version:beta:prepathTo release a new patch for a production version:
npm run version:patch
npm run version:minorSet the following repository secrets for GitHub Actions:
APPLE_ID macOS
APPLE_ID_PASS
CSC_KEY_PASSWORD
CSC_LINK
WIN_CSC_KEY_PASSWORD Windows
WIN_CSC_LINK
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
UPDATE_FEED_URL Custom URL to make auto-update work
INTERNAL_BUCKET Bucket name for internal releases
INTERNAL_UPDATE_FEED_URL
PLATFORM_URL Backend URL
SERIOUS_PROTECTION Password for Basic Auth
BETA_PLATFORM_URL
BETA_SERIOUS_PROTECTION
FONT_AWESOME_TOKEN Token for Font Awesome Pro
READ_PACKAGES_TOKEN GitHub token with scope to read packages
SENTRY_DSN Sentry
TRACK_EVENTS Send some events to our backend
KEYBASE_WEBHOOK Send a notification for successful releases to a Keybase channel via the Keybase webhookbot
We're using OVH public cloud object storage as a S3 alternative.
- Create a public bucket e.g.
bucketname - Create another public bucket e.g.
bucketname+segments. (This is needed because otherwise, this bucket will be created automatcally when uploading the first releases. But this bucket is then private, so the releases cannot be distributed publicly. You could also use the swift CLI to to make the bucket public.) - Set the GHA secret
UPDATE_FEED_URLto the public location of the bucket (for auto-updating):https://storage.de.cloud.ovh.net/v1/AUTH_string/bucketname
In addition to make auto update work, you need to get developer certificates from Apple, and set appropriate secrets in GitHub actions.
NB: zip as build target is required to make auto-update work: electron-userland/electron-builder#2199
Guides:
- https://codycallahan.com/blog/deploying-electron-with-github-actions-macos
- https://www.electron.build/code-signing
- Get a Windows Code Signing Certificate
- Export the cert with private key and password
- Encode cert as base64 (https://www.electron.build/code-signing.html#travis-appveyor-and-other-ci-servers) and set it as
WIN_CSC_LINK. - Set the password in
WIN_CSC_KEY_PASSWORD.