d3ro-voice/.forgejo/workflows/release.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

81 lines
3.5 KiB
YAML

name: release
# Canonical tag-triggered desktop release built and published on Forgejo.
# GitLab CI (.gitlab-ci.yml) and GitHub Actions (.github/workflows/release.yml)
# remain alternate builders; all three converge on publish-forgejo-release.mjs
# so the Forgejo feed is the single update source.
#
# Required repository secrets:
# FORGEJO_TOKEN — PAT with write:package + write:repository
# WIN_CSC_LINK — base64 Authenticode PFX (public-trust)
# WIN_CSC_KEY_PASSWORD — PFX password
# WIN_CSC_EXPECTED_SIGNER_SUBJECT — exact certificate subject
# Release fails closed when signing material is absent.
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
release-windows:
runs-on: windows
defaults: { run: { shell: pwsh } }
steps:
- name: checkout
env: { CI_TOKEN: "${{ github.token }}" }
run: |
$u = [Uri]$env:GITHUB_SERVER_URL
$url = "$($u.Scheme)://actions:$($env:CI_TOKEN)@$($u.Authority)/$($env:GITHUB_REPOSITORY).git"
if (-not (Test-Path .git)) { git init -q . }
if (git remote | Select-String -Quiet '^origin$') { git remote set-url origin $url } else { git remote add origin $url }
git fetch -q --depth 1 origin $env:GITHUB_REF
git checkout -q -f FETCH_HEAD
git clean -qfdx
- name: 버전 정본 대조
run: |
node scripts/ci/sync-version.mjs --check --tag "$env:GITHUB_REF_NAME"
- name: 의존성 설치
run: npm ci
- name: STT 사이드카 빌드 (로컬 전사 엔진)
run: |
# 로컬 전사는 faster-whisper 사이드카에 의존한다. 이 번들이 빠지면
# 설치본에서 전사가 전혀 동작하지 않으므로 패키징 전에 반드시 빌드/검증한다.
npm run sidecar:setup --workspace=@d3ro/desktop
npm run sidecar:build --workspace=@d3ro/desktop
node scripts/ci/verify-sidecar-bundle.mjs
- name: 데스크톱 빌드 (서명 필수)
env:
WIN_CSC_LINK: "${{ secrets.WIN_CSC_LINK }}"
WIN_CSC_KEY_PASSWORD: "${{ secrets.WIN_CSC_KEY_PASSWORD }}"
WIN_CSC_EXPECTED_SIGNER_SUBJECT: "${{ secrets.WIN_CSC_EXPECTED_SIGNER_SUBJECT }}"
run: |
if (-not $env:WIN_CSC_LINK -or -not $env:WIN_CSC_KEY_PASSWORD) {
throw "WIN_CSC_LINK / WIN_CSC_KEY_PASSWORD 가 없으면 stable 릴리스를 게시할 수 없습니다."
}
if ($env:WIN_CSC_EXPECTED_SIGNER_SUBJECT -match '(?i)Everything2EverythingDev') {
throw "로컬 개발 인증서는 production 서명 identity가 아닙니다."
}
npm run build --workspace=@d3ro/desktop
Push-Location apps/desktop
npx electron-builder --win --x64 --config electron-builder.yml --publish never
Pop-Location
- name: Windows 산출물 검증
env:
WIN_CSC_EXPECTED_SIGNER_SUBJECT: "${{ secrets.WIN_CSC_EXPECTED_SIGNER_SUBJECT }}"
run: |
$releaseVersion = node -p "require('./release/product-version.json').version"
& scripts/ci/verify-windows-release-artifact.ps1 -ExpectedVersion $releaseVersion -ExpectedSignerSubject $env:WIN_CSC_EXPECTED_SIGNER_SUBJECT -ReleaseDirectory "apps/desktop/release/$releaseVersion"
- name: Forgejo 릴리스 + feed 게시
env:
FORGEJO_TOKEN: "${{ secrets.FORGEJO_TOKEN }}"
FORGEJO_REPO: "${{ github.server_url }}/${{ github.repository }}"
run: |
node scripts/ci/publish-forgejo-release.mjs