The installer is unsigned, so latest.yml is now signed with an Ed25519 key and the app verifies the downloaded installer against it before installing. npm run release -- patch|minor bumps, gates, tags, builds, signs, publishes, re-verifies the public feed and pushes; --resume continues after a failure. The retired GitLab registry publisher is removed.
64 lines
2.8 KiB
YAML
64 lines
2.8 KiB
YAML
name: release
|
|
|
|
# 태그(vX.Y.Z) 데스크톱 릴리스 — 로컬 `npm run release` 와 같은 스크립트를 쓰는 예비 경로.
|
|
# 보통은 로컬 명령이 빌드·게시까지 끝낸 뒤 태그를 푸시하므로, 피드에 이미 그 버전이 있으면 건너뛴다.
|
|
#
|
|
# Required repository secrets (npm run release:secrets 로 .env 에서 동기화):
|
|
# FORGEJO_TOKEN — PAT with write:package + write:repository
|
|
# D3RO_UPDATE_SIGNING_KEY — latest.yml Ed25519 서명 키 (없으면 게시 실패)
|
|
# Optional (Authenticode — 있으면 설치본에 서명, 없으면 무서명 + Ed25519 메타데이터 서명):
|
|
# WIN_CSC_LINK, WIN_CSC_KEY_PASSWORD
|
|
|
|
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: 이미 게시됐는지 확인
|
|
id: feed
|
|
run: |
|
|
$releaseVersion = node -p "require('./release/product-version.json').version"
|
|
$url = "https://git.chanpaca.net/api/packages/yunchan/generic/d3ro-voice/$releaseVersion/latest.yml"
|
|
try { Invoke-WebRequest -Uri $url -Method Get -UseBasicParsing | Out-Null; $published = 'true' } catch { $published = 'false' }
|
|
"published=$published" >> $env:GITHUB_OUTPUT
|
|
if ($published -eq 'true') { Write-Host "$releaseVersion 는 이미 피드에 있습니다 — 건너뜁니다." }
|
|
|
|
- name: 의존성 설치
|
|
if: steps.feed.outputs.published != 'true'
|
|
run: npm ci
|
|
|
|
- name: 설치본 빌드
|
|
if: steps.feed.outputs.published != 'true'
|
|
env:
|
|
WIN_CSC_LINK: "${{ secrets.WIN_CSC_LINK }}"
|
|
WIN_CSC_KEY_PASSWORD: "${{ secrets.WIN_CSC_KEY_PASSWORD }}"
|
|
run: node scripts/ci/build-desktop-installer.mjs
|
|
|
|
- name: Forgejo 피드 게시 (latest.yml Ed25519 서명 + 공개 URL 검증)
|
|
if: steps.feed.outputs.published != 'true'
|
|
env:
|
|
FORGEJO_TOKEN: "${{ secrets.FORGEJO_TOKEN }}"
|
|
D3RO_UPDATE_SIGNING_KEY: "${{ secrets.D3RO_UPDATE_SIGNING_KEY }}"
|
|
FORGEJO_REPO: "${{ github.server_url }}/${{ github.repository }}"
|
|
run: node scripts/ci/publish-forgejo-release.mjs
|