-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (56 loc) · 2.4 KB
/
Copy pathrelease.yml
File metadata and controls
60 lines (56 loc) · 2.4 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
49
50
51
52
53
54
55
56
57
58
59
60
name: Release
# Builds and attaches portable app bundles to the GitHub release matching a
# pushed version tag (e.g. `v1.2.3`, created by `make version-patch/-minor/
# -major`). NSIS installer is explicitly out of scope here -- it stays a
# local/manual `make dist-win` concern (see issue #47). The macOS dmg/zip
# build is unsigned and unnotarized (identity: null in electron-builder.yml)
# and needs no extra secrets -- see issue #81.
#
# This is independent of `make publish`, which creates the release shell
# (via `gh release create --generate-notes`) with notes but no artifacts.
# electron-builder's own GitHub publisher (`--publish always`) will create
# the release as a draft if it doesn't exist yet, or attach to the existing
# one if `make publish` already ran -- either order works.
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
strategy:
# Each OS builds/publishes a completely independent artifact -- a
# real failure on one platform (e.g. #117's macOS universal-build
# issue) has no bearing on whether the other two platforms' builds
# are valid, so the default fail-fast behavior (cancelling the
# still-running jobs the moment any one matrix entry fails) only
# hides real, independent results behind a misleading "cancelled"
# status instead of "success"/"failure" for jobs that would have
# otherwise completed on their own.
fail-fast: false
matrix:
include:
- os: ubuntu-latest
build-cmd: npx electron-builder --linux AppImage --publish always
- os: windows-latest
build-cmd: npx electron-builder --win portable --publish always
- os: macos-latest
build-cmd: npx electron-builder --mac dmg zip --universal --publish always
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- run: npm run build
- run: ${{ matrix.build-cmd }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Makes electron-builder's bundled appimagetool self-extract
# instead of FUSE-mounting -- avoids depending on the runner
# image happening to have libfuse2/libfuse2t64 preinstalled.
# No-op on non-Linux matrix entries.
APPIMAGE_EXTRACT_AND_RUN: '1'