From a6d2e712acc879cfb380bbcf0ef4f9fc55c048f2 Mon Sep 17 00:00:00 2001 From: tbphp Date: Thu, 27 Aug 2026 15:53:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(release):=20=E7=BB=9F=E4=B8=80=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=89=88=E6=9C=AC=E5=8F=B7=E4=BD=9C=E4=B8=BA=E6=A0=87?= =?UTF-8?q?=E9=A2=98=20(#481)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- internal/webui/workflow_test.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5631d4d0..58e31d81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1039,7 +1039,7 @@ jobs: if: ${{ needs.publication-preflight.outputs.write_mode == 'publish' }} uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 with: - name: GPT-Load ${{ github.ref_name }} + name: ${{ github.ref_name }} target_commitish: ${{ github.sha }} draft: true prerelease: ${{ needs.validate-tag.outputs.prerelease }} diff --git a/internal/webui/workflow_test.go b/internal/webui/workflow_test.go index 5fa618a2..7c918528 100644 --- a/internal/webui/workflow_test.go +++ b/internal/webui/workflow_test.go @@ -1303,6 +1303,13 @@ func TestReleaseWorkflowKeepsReleaseNotesConciseAndWarnsAboutDataIncompatibility releaseJob := workflowJobBlock(t, content, "publish-github") draftStep := workflowStepBlock(t, releaseJob, "Create or update GitHub Release draft") + if !strings.Contains(draftStep, "name: ${{ github.ref_name }}") { + t.Fatalf("release draft title must be the tag version only:\n%s", draftStep) + } + if strings.Contains(draftStep, "name: GPT-Load ${{ github.ref_name }}") { + t.Fatalf("release draft title must not include the product prefix:\n%s", draftStep) + } + // generate_release_notes 已经从 commit 历史生成"本次变更"部分,手写 body // 只需要保留一次性读不到就可能造成数据损坏的警告,其余标准运维信息 // (备份、tag 语义、usage 是 estimate 等)都是跨版本不变的事实,交给 README