Build and upload Mac app artifact #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |
- 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 |