-
Notifications
You must be signed in to change notification settings - Fork 167
53 lines (52 loc) · 1.43 KB
/
app-artifacts-mac.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
name: Build and upload Mac app artifact
on:
workflow_dispatch:
inputs:
buildBranch:
description: 'Headlamp ref/branch/tag'
required: true
default: 'main'
signBinaries:
description: Notarize app
default: false
type: boolean
jobs:
build-mac:
runs-on: macos-latest
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.buildBranch }}
- name: Setup nodejs
uses: actions/setup-node@v1
with:
node-version: 18.x
- uses: actions/setup-go@v2
with:
go-version: '1.20.*'
- name: Dependencies
run: brew install make
- name: Add MacOS certs
if: matrix.os == 'macos-latest' && startsWith(github.ref, 'refs/tags/')
run: cd ./app/mac/scripts/ && sh ./setup-certificate.sh
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
- name: Build Notarized App Mac
if: ${{ inputs.signBinaries }}
run: |
make app-mac
env:
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
- name: Build App Mac
if: ${{ ! inputs.signBinaries }}
run: |
make app-mac
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: DMGs
path: ./app/dist/Headlamp*.*
if-no-files-found: error
retention-days: 1