Repository navigation
fix(ci): 主分支构建成功后自动发布 Pre-release - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当前 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 后首次实际验证自动发布。


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
The PR adds automatic previews for successful
mainbuilds and keeps version-tag 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 --> JReviews (1) · Last reviewed commit: "fix(ci): publish main builds as prerelea..." · Reviewed by Greptile