Skip to content

Comments

Add auto-update support for macOS via GitHub Releases#206

Open
hanneshapke wants to merge 1 commit intomainfrom
auto-updater
Open

Add auto-update support for macOS via GitHub Releases#206
hanneshapke wants to merge 1 commit intomainfrom
auto-updater

Conversation

@hanneshapke
Copy link
Collaborator

What

Adds automatic update functionality to the Electron app using electron-updater.
When a new version is published as a GitHub Release, running instances will
detect it, download the update in the background, and prompt the user to restart.

Changes

  • src/frontend/package.json: Added electron-updater dependency, publish
    config pointing to dataiku/kiji-proxy, and zip to macOS build targets
    (electron-updater uses the .zip for applying updates; the .dmg remains for
    first-time installs)
  • src/frontend/src/electron/electron-main.js: Auto-update lifecycle —
    checks for updates on launch, re-checks hourly, downloads in background,
    prompts user to restart when ready. Skipped in dev mode.
  • .github/workflows/release-dmg.yml: Upload .zip and latest-mac.yml
    to GitHub Releases alongside the .dmg

How it works

  1. Tag push triggers CI, which builds .dmg + .zip + latest-mac.yml
  2. All three artifacts are uploaded to the GitHub Release
  3. Running app checks latest-mac.yml via GitHub Releases API on startup
    (and every hour)
  4. If a newer version exists, the .zip is downloaded in the background
  5. User is prompted to restart — quitAndInstall() swaps the app in place

Notes

  • Code signing (already configured via CSC_LINK) is required for macOS
    auto-update to work. Unsigned builds will be blocked by Gatekeeper.
  • Notarization is not enabled (as before).

- Install electron-updater and configure publish target for dataiku/kiji-proxy
- Add zip to macOS build targets (required by electron-updater for in-place updates)
- Check for updates on launch and re-check every hour for long-running sessions
- Prompt user to restart when a new version is downloaded
- Skip update checks in development mode
- Update CI workflow to upload .zip and latest-mac.yml alongside .dmg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants