Skip to content

Build and upload Mac app artifact #41

Build and upload Mac app artifact

Build and upload Mac app artifact #41

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