From 8fc8f42b53d4fcf13d9eba5554587946dabe963f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiy=C5=8D=20Jo?= Date: Sun, 6 Sep 2026 13:17:10 +0800 Subject: [PATCH 1/2] fix(release): hydrate dispatched release notes from main --- .github/workflows/publish-github-release.yml | 3 ++- docs/RELEASE-NOTES-v0.4.0.en.md | 2 ++ docs/RELEASE-NOTES-v0.4.0.ja.md | 2 ++ docs/RELEASE-NOTES-v0.4.0.md | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-github-release.yml b/.github/workflows/publish-github-release.yml index 88d1aa5..c43d9de 100644 --- a/.github/workflows/publish-github-release.yml +++ b/.github/workflows/publish-github-release.yml @@ -218,8 +218,9 @@ jobs: "docs/RELEASE-NOTES-v$version.en.md" ) $hydratedFromMain = $false + $preferMainReleaseNotes = '${{ github.event_name }}' -eq 'workflow_dispatch' foreach ($noteFile in $noteFiles) { - if (-not (Test-Path -LiteralPath $noteFile -PathType Leaf)) { + if ($preferMainReleaseNotes -or -not (Test-Path -LiteralPath $noteFile -PathType Leaf)) { $content = git show "origin/main:$noteFile" if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace(($content -join "`n"))) { throw "Missing release notes in both release tag and main: $noteFile" } $directory = Split-Path -Parent $noteFile diff --git a/docs/RELEASE-NOTES-v0.4.0.en.md b/docs/RELEASE-NOTES-v0.4.0.en.md index 817de57..a2983c9 100644 --- a/docs/RELEASE-NOTES-v0.4.0.en.md +++ b/docs/RELEASE-NOTES-v0.4.0.en.md @@ -1,5 +1,7 @@ # SpatialViewer v0.4.0 +[简体中文](RELEASE-NOTES-v0.4.0.md) | [日本語](RELEASE-NOTES-v0.4.0.ja.md) | English + v0.4.0 adds the Rhino 3DM viewing workflow while preserving the existing CAD viewer and WinUI 3 shell behavior. ## Rhino 3DM diff --git a/docs/RELEASE-NOTES-v0.4.0.ja.md b/docs/RELEASE-NOTES-v0.4.0.ja.md index a8ce0a5..24847ab 100644 --- a/docs/RELEASE-NOTES-v0.4.0.ja.md +++ b/docs/RELEASE-NOTES-v0.4.0.ja.md @@ -1,5 +1,7 @@ # SpatialViewer v0.4.0 +[简体中文](RELEASE-NOTES-v0.4.0.md) | 日本語 | [English](RELEASE-NOTES-v0.4.0.en.md) + v0.4.0 では Rhino 3DM ビューアーを追加し、既存の CAD ビューアーと WinUI 3 シェルの挙動を維持します。 ## Rhino 3DM diff --git a/docs/RELEASE-NOTES-v0.4.0.md b/docs/RELEASE-NOTES-v0.4.0.md index c58ef07..b04b21d 100644 --- a/docs/RELEASE-NOTES-v0.4.0.md +++ b/docs/RELEASE-NOTES-v0.4.0.md @@ -1,5 +1,7 @@ # SpatialViewer v0.4.0 +简体中文 | [日本語](RELEASE-NOTES-v0.4.0.ja.md) | [English](RELEASE-NOTES-v0.4.0.en.md) + v0.4.0 正式接入 Rhino 3DM 看图能力,并保持既有 CAD 看图与 WinUI 3 外壳行为不变。 ## Rhino 3DM From efc9ef87d3724b344e18055da711a300811f1a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiy=C5=8D=20Jo?= Date: Sun, 6 Sep 2026 13:17:33 +0800 Subject: [PATCH 2/2] ci(release): add immutable v0.4.0 unpublished repair dispatch --- .../repair-unpublished-v040-release.yml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/repair-unpublished-v040-release.yml diff --git a/.github/workflows/repair-unpublished-v040-release.yml b/.github/workflows/repair-unpublished-v040-release.yml new file mode 100644 index 0000000..a2d1111 --- /dev/null +++ b/.github/workflows/repair-unpublished-v040-release.yml @@ -0,0 +1,53 @@ +name: Repair Unpublished v0.4.0 Release + +on: + push: + branches: [main] + paths: + - '.github/workflows/repair-unpublished-v040-release.yml' + +permissions: + contents: write + actions: write + +jobs: + repair-and-dispatch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Verify immutable unpublished v0.4.0 tag + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + tag='v0.4.0' + if gh release view "$tag" >/dev/null 2>&1; then + echo "$tag already has a published GitHub Release; no repair is needed." + exit 0 + fi + + git fetch --tags --force + existing="$(git rev-list -n 1 "refs/tags/$tag" 2>/dev/null || true)" + if [[ -z "$existing" ]]; then + echo "$tag is missing; refusing to create or retarget it from the repair workflow." + exit 1 + fi + echo "$tag remains immutable at $existing; only release-note metadata will be hydrated from main." + + - name: Dispatch normal release workflow + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + tag='v0.4.0' + if gh release view "$tag" >/dev/null 2>&1; then + echo "$tag already has a published GitHub Release; skipping dispatch." + exit 0 + fi + gh workflow run publish-github-release.yml -f version=0.4.0 -f dry_run=false + echo 'Dispatched normal Publish GitHub Release workflow for immutable v0.4.0.'