Skip to content

Merge pull request #355 from HASEL-UZH/350-win-code-sign #177

Merge pull request #355 from HASEL-UZH/350-win-code-sign

Merge pull request #355 from HASEL-UZH/350-win-code-sign #177

Workflow file for this run

name: Build and Publish PersonalAnalytics
on:
push:
branches:
- main
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_VERSION: 20
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: src/electron
strategy:
matrix:
include:
- os: windows-latest
- os: macos-latest
mac_arch: arm64
- os: macos-latest
mac_arch: x64
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node
uses: actions/setup-node@master
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
- name: Build
shell: bash
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
if [ "${{ matrix.mac_arch }}" == "arm64" ]; then
npm run build:mac:arm64
else
npm run build:mac:x64
fi
else
npm run build
fi
env:
MAC_ARCH_TYPE: ${{ matrix.mac_arch == 'arm64' && 'AppleSilicon' || 'Intel' }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
AZURE_PUBLISHER_NAME: ${{ vars.AZURE_PUBLISHER_NAME }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }}
AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}