-
Notifications
You must be signed in to change notification settings - Fork 108
190 lines (157 loc) · 5.24 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
name: Build/Release
on: [push]
jobs:
MacOS:
runs-on: macos-latest
steps:
- name: Check out Git repository
uses: actions/checkout@master
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@master
with:
node-version: 16
- name: Prepare for private keys
run: |
mkdir -p ~/private_keys/
- name: Prepare for app notarization
# Import Apple API key for app notarization on macOS
run: |
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
- name: Install Dependencies
run: yarn
- name: Build Electron app
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: yarn build
env:
# macOS Signing
CSC_LINK: ${{ secrets.mac_certs }}
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
# macOS notarization API key
API_KEY_ID: ${{ secrets.api_key_id }}
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }}
ARCH: universal
- name: Release Electron app
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: yarn release
env:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
GH_TOKEN: ${{ secrets.github_token }}
# macOS Signing
CSC_LINK: ${{ secrets.mac_certs }}
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
# macOS notarization API key
API_KEY_ID: ${{ secrets.api_key_id }}
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }}
ARCH: universal
- name: .dmg artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
with:
name: dmg file
path: |
dist/*.dmg
- name: log artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
with:
name: log files
path: |
*.log
Windows:
runs-on: windows-latest
steps:
- name: Check out Git repository
uses: actions/checkout@master
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@master
with:
node-version: 16
- name: Prepare for private keys
run: |
mkdir -p ~/private_keys/
- name: Prepare for Windows signing
# Import Signing key for app signing on Windows
run: |
echo "$windows_certs" | base64 -d > ~/private_keys/Windows_Certificate.pfx
shell: bash
env:
windows_certs: ${{ secrets.windows_certs }}
- name: Install Dependencies
run: yarn
- name: Build Electron app
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: yarn build
env:
CSC_LINK: ~/private_keys/Windows_Certificate.pfx
CSC_KEY_PASSWORD: ${{ secrets.windows_certs_password }}
ARCH: x64
- name: Release Electron app
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: yarn release
env:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
GH_TOKEN: ${{ secrets.github_token }}
CSC_LINK: ~/private_keys/Windows_Certificate.pfx
CSC_KEY_PASSWORD: ${{ secrets.windows_certs_password }}
ARCH: x64
- name: .exe artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
with:
name: exe file
path: |
dist/*.exe
- name: .msi artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
with:
name: msi file
path: |
dist/*.msi
Linux:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@master
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@master
with:
node-version: 16
- name: Install Dependencies
run: yarn
- name: Build Electron app
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: yarn build
env:
ARCH: x64
- name: Release Electron app
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: yarn release
env:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
GH_TOKEN: ${{ secrets.github_token }}
ARCH: x64
- name: .deb artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
with:
name: deb file
path: |
dist/*.deb
- name: .rpm artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
with:
name: rpm file
path: |
dist/*.rpm
- name: .AppImage artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
with:
name: AppImage file
path: |
dist/*.AppImage