Skip to content

fix(ci): 主分支构建成功后自动发布 Pre-release - #4

Merged
hekuo5310 merged 1 commit into
mainfrom
fix/automatic-prereleases
Nov 6, 2026
Merged

hekuo5310 merged 1 commit into
mainfrom
fix/automatic-prereleases

Conversation

@hekuo5310

@hekuo5310 hekuo5310 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

当前 main 构建成功只上传 Actions artifacts,release job 仅接受 v* 标签,且没有设置 prerelease,因此合并后的成功构建不会出现在 Releases 页面。

本次增加 main 推送和 main 手动构建的自动预发布:使用 preview- 唯一标签,并将其指向实际构建的 GITHUB_SHA。v1.2.3 等完整版本发布正式版,v1.2.3-beta.1、v1.2.3-rc.1 及其他 v* 标签发布预发布版。预发布不占用 Latest,PR 和普通开发分支手动构建不发布。

发布仍依赖三个 package job 全部成功,并检查三个归档齐全;新 Release 保持草稿直到全部附件上传成功。重跑使用相同标签、补传附件并完成草稿发布,不移动已有标签。同步补充 BUILDING.md。

验证:Actionlint 1.7.12、Bash 语法检查、YAML 解析、git diff --check 全部通过;模拟 gh 的 14 个场景通过,覆盖标签分类、新建/重跑、精确提交目标、上传失败中止、缺少归档时拒绝发布。测试未创建真实 Release;合并到 main 后首次实际验证自动发布。

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

The PR adds automatic previews for successful main builds and keeps version-tag releases.

  • Successful builds on main now publish preview releases.

No actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Three package jobs succeed] --> B{Allowed event and ref?}
  B -->|No| C[Keep Actions artifacts only]
  B -->|main| D[Run-based preview tag targeting built commit]
  B -->|v tag| E[Classify stable or preview]
  D --> F[Require three archives]
  E --> F
  F --> G{Release exists?}
  G -->|No| H[Create draft and upload archives]
  G -->|Yes| I[Upload archives to existing release]
  H --> J[Publish after successful uploads]
  I --> J
Loading

Reviews (1) · Last reviewed commit: "fix(ci): publish main builds as prerelea..." · Reviewed by Greptile

@hekuo5310
hekuo5310 merged commit 1798663 into main Nov 6, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant