d3ro-voice/apps/desktop/electron-builder.yml
Yun Chan 7953706142 feat(release): publish desktop updates from a tag through one feed
Desktop clients had two competing update sources: the runtime pointed at a
legacy GitLab registry while the Forgejo packages were filled in by
hardcoded, version-pinned scripts. Operators could not tell which feed was
authoritative, and no release could be reproduced from a tag.

Auto-update now reads a single canonical Forgejo registry feed, updated by
a version-agnostic publisher that runs from the tag on Forgejo, GitLab, and
GitHub CI alike. Channel, minimum supported version, forced install,
full-versus-delta thresholds, staged rollout, and a remote kill switch come
from one policy file the client fetches alongside the feed. Tag creation is
gated on a clean tree, matching version surfaces, and a changelog section.
2026-09-16 23:23:00 +09:00

136 lines
6.1 KiB
YAML

appId: com.d3ro.voice
productName: D3RO Voice
copyright: Copyright © 2026 D3RO
# monorepo(npm workspaces)에서 electron이 루트 node_modules로 호이스팅되어
# 자동 감지가 실패하는 문제를 피하려고 명시적으로 버전 고정.
electronVersion: "33.4.11"
directories:
# buildResources를 build/로 지정 — resources/icons/가 비어있어 아이콘 자동 스캔이 실패하는 것을 우회.
# 아이콘 준비되면 build/icon.png(또는 .ico)를 두고 win.icon을 명시.
buildResources: build
output: release/${version}
files:
- out/**/*
- "!out/**/*.map"
# ────────────────────────────────────────────────────────────────────
# 자동 업데이트 feed — 이 설정이 있어야 electron-builder가
# latest.yml / latest-mac.yml (update info)를 생성한다.
# generic provider는 파일 생성만 트리거하고 직접 업로드는 하지 않음
# (업로드는 scripts/ci/publish-forgejo-release.mjs 담당).
# canonical 호스트 = Forgejo (git.chanpaca.net/yunchan/d3ro-voice).
# src/main/update-feed.ts의 UPDATE_FEED_URL과 반드시 동일 값 유지.
# ────────────────────────────────────────────────────────────────────
publish:
provider: generic
url: "https://git.chanpaca.net/api/packages/yunchan/generic/d3ro-voice/latest"
# prerelease 버전(0.1.1-alpha)에서 채널을 "alpha"로 감지해 alpha.yml을 만드는 동작 차단 —
# electron-updater(기본 채널 latest)가 latest.yml을 찾으므로 항상 latest 채널로 고정.
detectUpdateChannel: false
# native 모듈은 asar 외부에 배치
asarUnpack:
- "node_modules/better-sqlite3/**"
- "node_modules/uiohook-napi/**"
- "node_modules/@nut-tree-fork/**"
# ────────────────────────────────────────────────────────────────────
# Windows
# 주: icon 지정 시 resources/icons/icon.ico 필요. 초기 배포에선 생략하여
# electron 기본 아이콘 사용(아이콘 준비되면 win.icon 라인 추가).
# ────────────────────────────────────────────────────────────────────
win:
icon: build/icon.ico
# Stable artifacts must never silently fall back to an unsigned build.
forceCodeSigning: true
target:
- target: nsis
arch:
- x64
# ────────────────────────────────────────────────────────────────────
# macOS
# ────────────────────────────────────────────────────────────────────
mac:
# icns는 electron-builder가 build/icon.png(1024)에서 자동 생성
icon: build/icon.png
category: public.app-category.productivity
# 파일명 공백 금지 — GitLab Generic Package Registry가 공백을 불허해
# latest-mac.yml의 url과 레지스트리 업로드명이 어긋나면 업데이트 다운로드 404.
artifactName: "D3RO-Voice-${version}-${arch}.${ext}"
# x64 제외 — 사이드카(PyInstaller)가 arm64 전용이라 x64 산출물은 깨진 빌드가 됨.
# Intel Mac 수요 발생 시 x64 runner에서 별도 빌드.
target:
- target: dmg
arch:
- arm64
- target: zip
arch:
- arm64
hardenedRuntime: true
gatekeeperAssess: false
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
notarize: false
extendInfo:
NSMicrophoneUsageDescription: "D3RO Voice는 음성 인식을 위해 마이크 접근이 필요합니다."
NSCameraUsageDescription: "D3RO Voice는 스크린 컨텍스트 캡처를 위해 화면 녹화 권한이 필요합니다."
NSAppleEventsUsageDescription: "D3RO Voice는 활성 앱 정보를 가져오기 위해 다른 앱 제어 권한이 필요합니다."
NSSystemAdministrationUsageDescription: "D3RO Voice는 전역 핫키 등록을 위해 접근성 권한이 필요합니다."
dmg:
writeUpdateInfo: false
contents:
- x: 130
y: 220
- x: 410
y: 220
type: link
path: /Applications
# ────────────────────────────────────────────────────────────────────
# 공통 리소스 번들
# ────────────────────────────────────────────────────────────────────
extraResources:
# 앱 아이콘 (트레이/런타임용 — paths.ts getAppIconPath)
- from: build/icon.ico
to: icons/icon.ico
- from: build/icon.png
to: icons/icon.png
# 효과음 (플랫폼 공통)
- from: resources/sounds/
to: sounds/
filter:
- "*.wav"
# SoX 바이너리
- from: resources/sox/
to: sox/
filter:
- "**/*"
# Ollama 바이너리 (포터블 zip을 사전 배치)
- from: resources/ollama/
to: ollama/
filter:
- "**/*"
nsis:
# 파일명 공백 금지 — mac.artifactName 주석과 동일한 이유 (latest.yml url 정합)
artifactName: "D3RO-Voice-Setup-${version}-${arch}.${ext}"
# oneClick=false + perMachine=false 조합이 System.dll 0xc0000005 크래시 사례(#7921).
# 사내 테스트 단계에선 oneClick=true로 전환하여 크래시 경로 회피.
oneClick: true
perMachine: false
allowToChangeInstallationDirectory: false
createDesktopShortcut: true
createStartMenuShortcut: true
shortcutName: D3RO Voice
deleteAppDataOnUninstall: false
# installer.nsh 비활성화 유지 (System.dll 크래시 방지)
npmRebuild: true