Deploying

To sign on Mac, you need a developer account and a distribution certificate. Electron-build will auto pick up the cert if it exists

Way2 may be easy for private repos too

Way 1: AutoUpdate Server

Hazel

Easy zeit creation that pulls from github releases even for private repos

git clone https://github.com/zeit/hazel
cd hazel

#PUBLIC REPOS
now -e ACCOUNT="<github-account>" -e REPOSITORY="<github-repository>"
#Private REPOS
now --prod -e URL='https://<NOW DOMAIN>.now.sh' -e TOKEN="<GITHUB_TOKEN>" -e ACCOUNT="jsfuentes" -e REPOSITORY="Room"

Only run in the prod app version

const { app, autoUpdater } = require('electron')

const server = <your-deployment-url>
const feed = `${server}/update/${process.platform}/${app.getVersion()}`

autoUpdater.setFeedURL(feed)

setInterval(() => {
  autoUpdater.checkForUpdates()
}, 600000) //check every 10 minutes

Notifying user

Way 2: Electron-Updater

Easiest setup! Struggles with private repos, apparently private repos work here too

1)

2) Configure publisharrow-up-right in package.json under "build" key

3)

Electron-updater Vs. built-in autoUpdater

https://github.com/electron/electron/issues/7155arrow-up-right)

Way 3, Electron Way:

Electron team maintains free update.electronjs.orgarrow-up-right for free apps in github releases

  • App runs on macOS or Windows

  • App has a public GitHub repository

  • Builds are published to GitHub Releases

  • Builds are code-signed

On Mac: App must be signedarrow-up-right for auto updates, based on Squirrel.Macarrow-up-right

On WIndows: Make sure not to update app the [first time it runs](**

Last updated