-
Notifications
You must be signed in to change notification settings - Fork 172
102 lines (102 loc) · 3.21 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
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
name: Build
on:
push:
branches:
- master
paths-ignore:
- "website"
- "CHANGELOG.md"
workflow_call:
workflow_dispatch:
jobs:
build:
name: "Build"
strategy:
matrix:
include:
- os: ubuntu-latest
name: linux
task: build:linux-all
- os: macos-latest
name: mac
task: build:mac-all
- os: windows-latest
name: win
task: build:win-all
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Cache
uses: actions/cache@v3
with:
path: "node_modules"
key: ${{ runner.os }}-build-${{ hashFiles('yarn.lock') }}
- name: Install
run: |
yarn install --immutable --network-timeout 120000
- 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.APPLE_API_KEY_FILE }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY }}.p8
- name: Build
env:
APPLE_API_KEY_PATH: ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY }}.p8
API_KEY_ID: ${{ secrets.APPLE_API_KEY }}
API_KEY_ISSUER_ID: ${{ secrets.APPLE_API_ISSUER }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
run: |
yarn build
yarn lerna run ${{ matrix.task }} --stream
- name: Build Snap
if: matrix.name == 'linux'
run: |
sudo snap install snapcraft --classic
yarn lerna run build:snap --stream
- name: Upload windows all-in-one build
uses: actions/upload-artifact@v3
with:
name: built-app-all-in-one-${{ matrix.name }}
path: |
app/electron/dist/Pomatez-v+([0-9]).+([0-9]).+([0-9])-win-*.exe
- name: Upload ia32 builds
uses: actions/upload-artifact@v3
with:
name: built-app-ia32-${{ matrix.name }}
path: |
app/electron/dist/Pomatez*ia32*.*
- name: Upload x64 builds
uses: actions/upload-artifact@v3
with:
name: built-app-x64-${{ matrix.name }}
path: |
app/electron/dist/Pomatez*x64*.*
app/electron/dist/Pomatez*x86_64*.*
app/electron/dist/Pomatez*amd64*.*
- name: Upload arm64 builds
uses: actions/upload-artifact@v3
with:
name: built-app-arm64-${{ matrix.name }}
path: |
app/electron/dist/Pomatez*arm64*.*
app/electron/dist/Pomatez*aarch64*.*
- name: Upload armv7l builds
uses: actions/upload-artifact@v3
with:
name: built-app-armv7l-${{ matrix.name }}
path: |
app/electron/dist/Pomatez*armv7l*.*
- name: Upload autoupdaters
uses: actions/upload-artifact@v3
with:
name: built-app-AutoUpdater-${{ matrix.name }}
path: |
app/electron/dist/latest*