-
Notifications
You must be signed in to change notification settings - Fork 188
62 lines (54 loc) · 1.95 KB
/
build.yml
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
61
62
name: Build
on: [push]
jobs:
build:
name: Build for ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- kind: linux
os: ubuntu-latest
platform: linux
- kind: windows
os: windows-latest
platform: win
# Macos-11 is deprecated, macos-12 would require package updates, see PR #1409
# - kind: mac
# os: macos-11
# platform: osx
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
# The talk on the street says this might be a good version for building.
node-version: 14.20.1
cache: yarn
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- if: matrix.platform == 'linux'
name: Install bsdtar # Required by electron-builder when targeting pacman.
run: |
sudo apt-get update -y
sudo apt-get install -y libarchive-tools
- name: Build project
id: build
uses: StarUbiquitous/[email protected] # Store stdout/stderr to outputs.
# You might want to turn this on if there's problems with electron-builder.
# env:
# DEBUG: electron-builder
with:
run: yarn build-${{ matrix.platform }} --publish=never
- if: steps.build.outputs.stderr != ''
name: Log stderr
continue-on-error: true
run: echo '${{ steps.build.outputs.stderr }}'
# Creating Electron executables can in some cases fail with exit code 0.
# Check the output of build step for obvious signs of failure.
- if: contains(steps.build.outputs.stderr, '[FAIL]')
name: Check STDERR for trouble
uses: actions/github-script@v6
with:
script: core.setFailed('It seems the build process failed silently. See previous step for more info.')