d3ro-voice/.forgejo/workflows/portable.yml

88 lines
No EOL
3.7 KiB
YAML

name: portable-unsigned
# 서명 없는 휴대용 배포 채널.
#
# 배경: NSIS/MSIX 설치본은 public-trust Authenticode 서명이 필수라 인증서가 없는 동안
# 게시할 수 없다(실측: 릴리스 파이프라인 2회 모두 서명 가드에서 실패). 이 워크플로는
# 인증서 없이 동작하는 7z 분할 볼륨 + Scoop 채널을 게시한다.
#
# 안전 규칙:
# - 자동 업데이트 피드(latest.yml / update-policy.json)를 절대 건드리지 않는다.
# - 파일명에 -portable 을 두어 서명된 릴리스 자산과 혼동되지 않게 한다.
# - Cloudflare 업로드 한도(100MiB)를 넘지 않게 95MiB 볼륨으로 나누어 게시한다.
#
# 필요한 시크릿: FORGEJO_TOKEN (write:package)
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
portable-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: |
npm run sidecar:setup --workspace=@d3ro/desktop
npm run sidecar:build --workspace=@d3ro/desktop
node scripts/ci/verify-sidecar-bundle.mjs
- name: 데스크톱 번들 빌드
run: npm run build --workspace=@d3ro/desktop
- name: 데스크톱 렌더러 번들 검증
run: node scripts/ci/verify-desktop-renderer-bundles.mjs
- name: 휴대용 ZIP + Scoop 매니페스트 생성
run: node scripts/ci/build-portable.mjs
- name: Forgejo portable 채널 게시
env:
FORGEJO_TOKEN: "${{ secrets.FORGEJO_TOKEN }}"
run: node scripts/ci/publish-portable-release.mjs
- name: 게시 요약 출력
# Forgejo Actions 러너는 actions/upload-artifact@v4 의 GHES 스토리지 프로토콜을 지원하지 않으므로(GAP-REL-11),
# 실제 배포 산출물은 앞 단계에서 Forgejo Generic Package Registry 에 이미 게시됐고 여기서는 해시 요약을 남긴다.
run: |
$version = node -p "require('./release/product-version.json').version"
$manifestPath = "apps/desktop/release/$version/portable.json"
if (-not (Test-Path $manifestPath)) {
throw "portable.json 이 없습니다: $manifestPath"
}
$manifest = Get-Content $manifestPath -Raw | ConvertFrom-Json
$summaryLines = @(
"### Portable Release ($($manifest.version))",
"- Volumes: $($manifest.volumeCount)",
"- Total Size: $([math]::Round($manifest.totalSize / 1MB, 1)) MiB",
"- Feed: https://git.chanpaca.net/api/packages/yunchan/generic/d3ro-voice/portable-$($manifest.version)/portable.json"
)
foreach ($vol in $manifest.volumes) {
$summaryLines += " - ``$($vol.name)``: ``$($vol.sha256)``"
}
$summaryText = $summaryLines -join "`n"
Write-Host $summaryText
if ($env:GITHUB_STEP_SUMMARY) {
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value $summaryText -Encoding utf8
}