-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.55 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (39 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build and Release Electron App
on:
push:
tags:
- 'v*' # Trigger only on version tags like v1.0.0
permissions:
contents: read # build verification only — publishing is done from the
# maintainer's machine via scripts/publish-release.sh, which guarantees the
# exe and latest.yml always come from the SAME local build. A CI publish
# path would race it and overwrite latest.yml with a differently-hashed
# build, breaking electron-updater's sha512 verification (see issue #2).
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: Package Electron app (verification build, no publish)
# npm scripts pass --publish never to electron-builder. Without the
# flag, a tag build auto-selects the "onTag" publish policy and then
# fails on the missing GH_TOKEN (the v1.9.4 CI failure). Note:
# electron-builder 25.x reads no EP_PUBLISH env var — the CLI flag is
# the only reliable switch.
run: npm run build:${{ matrix.os == 'windows-latest' && 'win' || (matrix.os == 'macos-latest' && 'mac' || 'linux') }}
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: electron-build-${{ matrix.os }}
path: dist/**