Skip to content

Electron

Electron CI on GitHub Actions

Every platform build downloads Electron binaries and rebuilds native modules.

90s → 2s
Binary download
34m → 11m
Full matrix

Every platform build downloads Electron binaries and rebuilds native modules.

Why it happens

The Electron download cache and node-gyp build outputs are not persisted across runs.

What to change

  1. Cache ~/.cache/electron and ~/.cache/electron-builder
  2. Build macOS, Windows and Linux targets as parallel matrix legs on native runners
  3. Cache the node-gyp build directory so native modules are not recompiled

Electron on runnerhut

yaml
jobs:
build:
strategy:
matrix:
include:
- os: runnerhut-8vcpu-ubuntu-2404
- os: runnerhut-macos-15-m4
- os: runnerhut-8vcpu-windows-2022
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: npm ci && npx electron-builder --publish never
A working starting point

The only runnerhut-specific line is `runs-on: runnerhut-8vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.