-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (53 loc) · 1.95 KB
/
electron-release.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
name: Build and release electron
on: workflow_dispatch
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- name: Install deps
run: yarn install --frozen-lockfile
- name: Save env vars
run: echo "${{ secrets.DOTENV_VARS }}" >> .env
- name: Save sentry properties
run: echo "${{ secrets.SENTRY_PROPERTIES }}" >> sentry.properties
- name: Build UI
run: yarn build:ui
- name: Compile electron typescript
run: yarn compile:electron
- name: Prepare for app notarization
if: startsWith(matrix.os, 'macos')
# Import Apple API key for app notarization on macOS
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
# windows_certs: ${{ secrets.windows_certs }}
# windows_certs_password: ${{ secrets.windows_certs_password }}
github_token: ${{ secrets.github_token }}
build_script_name: build:bridge
release: true
env:
# macOS notarization API key
API_KEY_ID: ${{ secrets.api_key_id }}
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }}