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