-
Notifications
You must be signed in to change notification settings - Fork 2
128 lines (101 loc) · 3.45 KB
/
make.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
name: Build Installers
on: push
# on: pull_request
jobs:
macos:
name: Build for macOS
strategy:
matrix:
os: [macos-13, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.12
# https://github.com/electron/forge/issues/2807
# - run: python3 -m pip install setuptools --break-system-packages
- name: Set up Python for appdmg to be installed
run: python3 -m pip install setuptools
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
npm install
npm install -g [email protected]
- name: macOS certificate
env:
APPLE_CERTIFICATE: ${{ secrets.DEVELOPER_ID_APPLICATION }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.DEVELOPER_ID_APPLICATION_PASSWORD }}
run: |
KEY_CHAIN=build.keychain
CERTIFICATE_P12=certificate.p12
echo $APPLE_CERTIFICATE | base64 --decode > $CERTIFICATE_P12
security create-keychain -p actions $KEY_CHAIN
security default-keychain -s $KEY_CHAIN
security unlock-keychain -p actions $KEY_CHAIN
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $APPLE_CERTIFICATE_PASSWORD -T /usr/bin/codesign;
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN
rm -fr *.p12
- name: Run Make
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
npm run make
- uses: actions/upload-artifact@v4
with:
name: build_${{ matrix.os }}
path: out/make
if-no-files-found: error
# linux:
# name: Build for Linux
# strategy:
# matrix:
# os: [ubuntu-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 20
# # - name: Fix Permissions
# # # Workaround for https://github.com/electron/electron/issues/17972
# # run: |
# # sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
# # sudo chown root node_modules/electron/dist/chrome-sandbox
# # sudo apt install libx11-dev libxtst-dev libwayland-dev libxkbcommon-dev
# - run: npm install
# - run: npm run make
# - uses: actions/upload-artifact@v4
# with:
# name: build_${{ matrix.os }}
# path: out/make
# if-no-files-found: error
# windows:
# name: Build for Windows
# strategy:
# matrix:
# os: [windows-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 20
# # - name: Install Dependencies
# # # For some reason cmake.js sometimes skips the build step in CI on Windows in this
# # # case. So we install and execute cmake.js manually.
# # run: |
# # npm install cmake-js -g
# # npx cmake-js install
# # npm install
# - run: npm install
# - run: npm run make
# - uses: actions/upload-artifact@v4
# with:
# name: build_${{ matrix.os }}
# path: out/make
# if-no-files-found: error