-
Notifications
You must be signed in to change notification settings - Fork 8
86 lines (72 loc) · 2.56 KB
/
electron.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
name: Build electron app
on:
workflow_dispatch:
workflow_call:
jobs:
build-electron-app:
runs-on: ${{ matrix.os }}
env:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
GH_TOKEN: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install Node.js and PNPM
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
run: pnpm install
- name: Download certificate file
run: |
echo $APPLE_DEVELOPER_ID_FILE | base64 --decode >> developer-id.p12
if: matrix.os == 'macos-latest'
shell: bash
env:
APPLE_DEVELOPER_ID_FILE: ${{secrets.BCCM_APPLE_DEVELOPER_ID_FILE}}
- name: Build for production
run: pnpm build:electron
env:
NUXT_PUBLIC_APPLICATION_INSIGHTS: ${{ vars.NUXT_PUBLIC_APPLICATION_INSIGHTS }}
- name: Package the Electron app for Mac
run: pnpm package:electron
if: matrix.os == 'macos-latest'
env:
CSC_LINK: developer-id.p12
CSC_KEY_PASSWORD: ${{secrets.BCCM_APPLE_DEVELOPER_ID_PASSWORD}}
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.BCCM_APPLE_APP_SPECIFIC_PASSWORD}}
APPLE_ID: ${{secrets.BCCM_APPLE_ID_USERNAME}}
APPLE_ID_PASSWORD: ${{secrets.BCCM_APPLE_APP_SPECIFIC_PASSWORD}}
APPLE_TEAM_ID: KJ6LCYQ3A8
- name: Package the Electron app for Linux
run: pnpm package:electron
if: matrix.os == 'ubuntu-latest'
- name: Install AzureSignTool
run: dotnet tool install -g AzureSignTool
if: matrix.os == 'windows-latest'
shell: bash
- name: Package the Electron app for Windows
run: pnpm package:electron
if: matrix.os == 'windows-latest'
env:
WINDOWS_DIRECTORY_ID: ${{ secrets.BCCM_WINDOWS_DIRECTORY_ID }}
WINDOWS_CLIENT_ID: ${{ secrets.BCCM_WINDOWS_CLIENT_ID }}
WINDOWS_CLIENT_SECRET: ${{ secrets.BCCM_WINDOWS_CLIENT_SECRET }}
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: app
path: |
dist-app/BMM*
- name: Archive Debian packages
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: app
path: |
dist-app/bmm-web*.deb