-
-
Notifications
You must be signed in to change notification settings - Fork 283
70 lines (65 loc) · 2.58 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
name: Test build release
on:
pull_request:
branches: ['*']
types:
- opened
- synchronize
- closed
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test-build-release:
# commit the word "build" to the commit message to enable this job
if: contains(github.event.head_commit.message, 'build')
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm ci
- name: Install necessary FlatPak tools
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt update && sudo apt install flatpak flatpak-builder elfutils
- name: macOS certificate
if: matrix.os == 'macos-13'
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_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: Build release
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_SIGNING_ID: ${{ secrets.APPLE_SIGNING_ID }}
shell: bash
run: |
npm ci
if [[ "${{ matrix.os }}" != "macos-13" ]]; then
npm run make
else
npm run make -- --arch=universal
fi
- uses: actions/upload-artifact@v3
with:
name: debug-build-${{ matrix.os }}
path: out/make