-
Notifications
You must be signed in to change notification settings - Fork 52
111 lines (93 loc) · 2.35 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Package-Build
on: [push, pull_request]
jobs:
Lint:
runs-on: macos-11.0
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Installing Node
uses: actions/[email protected]
with:
node-version: 14
- name: Install deps
run: |
npm i -g [email protected]
yarn
- name: Lint
run: yarn lint
macOS-Build:
runs-on: macos-11.0
needs: Lint
strategy:
matrix:
include:
- arch: x64
# - arch: arm64
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Installing Node
uses: actions/[email protected]
with:
node-version: 14
- name: Install deps
run: |
sudo npm i -g [email protected]
yarn
- name: Build
run: yarn pack:mac-${{matrix.arch}}
env:
ARCH: ${{matrix.arch}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPSTORE_USERNAME: ${{ secrets.APPSTORE_USERNAME }}
APPSTORE_PASSWORD: ${{ secrets.APPSTORE_PASSWORD }}
USE_HARD_LINKS: false
- name: Package artifacts
run: |
mkdir artifact-dmg
mv dist/*.dmg artifact-dmg/
- uses: actions/upload-artifact@master
name: Upload DMG
with:
name: macOS .dmg (${{matrix.arch}})
path: artifact-dmg
Windows-Build:
runs-on: windows-2016
needs: Lint
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Installing Node
uses: actions/[email protected]
with:
node-version: 14
- name: Build
shell: powershell
run: |
npm i -g [email protected]
yarn
- name: Build
run: yarn pack:win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
# DEBUG: electron-builder,electron-builder:*
- name: Package artifacts
run: |
mkdir artifact-setup
mv dist/*.exe artifact-setup/
- uses: actions/upload-artifact@master
name: Upload installer
with:
name: Windows installer
path: artifact-setup