-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (63 loc) · 1.94 KB
/
build.yaml
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
name: Build packages
on:
release:
types: [published]
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
electron_cmd: win
package_glob: dist/*.exe
- os: ubuntu-latest
electron_cmd: linux
package_glob: |
dist/*.deb
dist/*.rpm
- os: macos-latest
electron_cmd: mac
package_glob: dist/*.dmg
runs-on: ${{ matrix.os }}
env:
NODE_OPTIONS: "--max_old_space_size=4096"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Setup yarn 3.x
run: |
corepack enable
yarn set version 3.5.0
- uses: actions/setup-node@v4
with:
node-version: 18.15.x
cache: "yarn"
- name: Install packages
run: yarn install --immutable
- name: Build
run: yarn build
- name: Package the electron app MacOS
if: matrix.os == 'macos-latest'
env:
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
CSC_LINK: certificate.p12
APPLEID: ${{ secrets.APPLE_NOTARIZE_APPLEID }}
APPLEIDPASS: ${{ secrets.APPLE_NOTARIZE_PASSWORD }}
run: |
echo "${{ secrets.APPLE_CERTIFICATE_P12 }}" | base64 -d -o certificate.p12
yarn electron:package:mac
- name: Package the electron app Linux
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y rpm
yarn electron:package:linux
- name: Package the electron app Windows
if: matrix.os == 'windows-latest'
run: yarn electron:package:win
- name: Upload
uses: actions/upload-artifact@v3
with:
name: app_dist_${{ matrix.electron_cmd }}
path: ${{ matrix.package_glob }}
if-no-files-found: error