-
Notifications
You must be signed in to change notification settings - Fork 18
52 lines (50 loc) · 1.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
name: Build
on:
push:
branches:
- main
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_VERSION: 20
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: src/electron
strategy:
matrix:
include:
- os: windows-latest
- os: macos-latest
mac_arch: arm64
- os: macos-latest
mac_arch: x64
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node
uses: actions/setup-node@master
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
- name: Build
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
if [ "${{ matrix.mac_arch }}" == "arm64" ]; then
npm run build:mac:arm64
else
npm run build:mac:x64
fi
else
npm run build
fi
env:
MAC_ARCH_TYPE: ${{ matrix.mac_arch == 'arm64' && 'AppleSilicon' || 'Intel' }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}