92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: Build macOS
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
notarize:
|
|
description: 'Apple Notarization 활성화'
|
|
required: false
|
|
default: 'false'
|
|
type: choice
|
|
options:
|
|
- 'false'
|
|
- 'true'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build & Package (macOS)
|
|
runs-on: macos-14 # arm64 (Apple Silicon)
|
|
timeout-minutes: 60
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch: [arm64, x64]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Setup Python (sidecar 빌드용)
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install system deps (sox)
|
|
run: brew install sox
|
|
|
|
- name: Install npm dependencies
|
|
run: npm install
|
|
|
|
- name: Bundle SoX into resources
|
|
working-directory: apps/desktop
|
|
run: bash scripts/install-sox.sh
|
|
|
|
- name: Install Python dependencies
|
|
working-directory: apps/desktop
|
|
run: |
|
|
pip install pyinstaller
|
|
pip install -r sidecar/requirements.txt
|
|
|
|
- name: Build sidecar (PyInstaller)
|
|
working-directory: apps/desktop
|
|
run: python scripts/build-sidecar.py
|
|
|
|
- name: Rebuild native modules for Electron
|
|
run: npx --yes @electron/rebuild@3 --version=33.4.11
|
|
|
|
- name: Build renderer/preload/main
|
|
run: npm run build
|
|
|
|
- name: electron-builder dist (mac, ${{ matrix.arch }})
|
|
working-directory: apps/desktop
|
|
env:
|
|
# Apple 서명/공증 (notarize=true일 때만 사용)
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
|
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
CSC_LINK: ${{ secrets.MAC_CERT_P12_BASE64 }}
|
|
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_P12_PASSWORD }}
|
|
NOTARIZE: ${{ inputs.notarize || 'false' }}
|
|
run: |
|
|
if [ "$NOTARIZE" = "true" ] && [ -n "$APPLE_ID" ]; then
|
|
npx electron-builder --mac --${{ matrix.arch }} -c.mac.notarize=true
|
|
else
|
|
npx electron-builder --mac --${{ matrix.arch }} -c.mac.notarize=false
|
|
fi
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: d3ro-voice-mac-${{ matrix.arch }}
|
|
path: |
|
|
apps/desktop/release/*.dmg
|
|
apps/desktop/release/*.zip
|
|
if-no-files-found: error
|
|
retention-days: 7
|