-
-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (77 loc) · 2.42 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build & Release
on:
push:
branches:
- main
tags:
- v*
pull_request:
jobs:
test:
name: Test (${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
arch: [x64]
include:
- os: macOS-latest
arch: arm64
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 16.x
cache: yarn
- name: Install
run: yarn --frozen-lockfile --network-timeout 100000 || yarn --frozen-lockfile --network-timeout 100000 || yarn --frozen-lockfile --network-timeout 100000
build:
needs: test
name: Build (${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Build for supported platforms
# https://github.com/electron/electron-packager/blob/ebcbd439ff3e0f6f92fa880ff28a8670a9bcf2ab/src/targets.js#L9
# 32-bit Linux unsupported as of 2019: https://www.electronjs.org/blog/linux-32bit-support
os: [macOS-latest, ubuntu-latest, windows-latest]
arch: [x64, arm64]
include:
- os: windows-latest
arch: ia32
- os: ubuntu-latest
arch: armv7l
# Publishing artifacts for multiple Windows architectures has
# a bug which can cause the wrong architecture to be downloaded
# for an update, so until that is fixed, only build Windows x64
exclude:
- os: windows-latest
arch: arm64
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 16.x
cache: yarn
- name: Install
run: yarn --network-timeout 100000 || yarn --network-timeout 100000 || yarn --network-timeout 100000
- name: Build
if: startsWith(github.ref, 'refs/tags/')
run: yarn build:current
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
files: |
dist/**/*.deb
dist/**/*.dmg
dist/**/*setup*.exe
dist/**/*.nupkg
dist/**/*.rpm
dist/**/*.zip
dist/**/RELEASES