d3ro-voice/.github/workflows/build-mac.yml
Yun Chan 7e1972a315
Some checks failed
deploy-site / deploy (push) Failing after 29s
release / release-windows (push) Failing after 6m37s
ci(release): build and verify the STT sidecar in every packaging pipeline
Packaging silently tolerates a missing resource directory: electron-builder
prints "file source doesn't exist" and continues, which is how installers that
could not transcribe were published.

Every pipeline that packages the desktop app now builds the sidecar and fails
when the engine or its VAD data is absent, so a release cannot ship without
local transcription.
2026-09-18 00:50:33 +09:00

91 lines
2.7 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: Build STT sidecar (PyInstaller)
working-directory: apps/desktop
run: |
# 로컬 전사는 사이드카 번들에 의존한다. 누락된 채 패키징하면 설치본에서
# 전사가 전혀 동작하지 않으므로 빌드 후 반드시 검증한다.
npm run sidecar:setup
npm run sidecar:build
node ../../scripts/ci/verify-sidecar-bundle.mjs
- 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