Skip to content

Build and upload Mac app artifact #60

Build and upload Mac app artifact

Build and upload Mac app artifact #60

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: Build Backend and Frontend
run: |
make
- name: Add MacOS certs
run: cd ./app/mac/scripts/ && sh ./setup-certificate.sh
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- name: Build Notarized App Mac
if: ${{ inputs.signBinaries }}
run: |
make app-mac
env:
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
APPLETEAMID: ${{ secrets.APPLETEAMID }}
- 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