Skip to content

fix(release): stable 仅发布正式版本,修复 4.28.0 被 beta 阻塞 - #178

Merged
Soulter merged 1 commit into
mainfrom
codex/stable-release-tags
Sep 12, 2026
Merged

Soulter merged 1 commit into
mainfrom
codex/stable-release-tags

Conversation

@Soulter

@Soulter Soulter commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

定时发布使用 sort -V 选择最新上游标签,会将 v4.28.0-beta.1 排在 v4.28.0 之后。由于 beta 的 Desktop Release 已存在,任务持续跳过正式版构建;beta 也会被作为 stable 发布。

Summary / 改动概述

  • tag-poll 在排序前只保留 vMAJOR.MINOR.PATCH 正式标签,排除 alpha、beta、rc、dev、nightly 等后缀及其他非正式标签;没有正式标签时明确失败。
  • 手动 tag-poll 使用相同规则校验 source_git_ref,防止通过手动入口将预发布版本发布到 stable。预发布标签、分支和 commit 需改用 custom。
  • 更新 workflow 输入说明和发布文档,补充正式版与预发布版共存、已有正式版、无正式标签、手动覆盖及 Latest 标记的回归测试。

Verification / 验证方式

使用带 TOML 支持的 Python 环境完成本地验证:

pnpm run test:prepare-resources
188 tests passed, 0 failed

python3 -m unittest discover -s scripts/ci -p 'test_*.py'
Ran 91 tests — OK

bash -n scripts/ci/resolve-build-context.sh
git diff --check
Passed

使用真实上游标签验证筛选逻辑,最新正式版正确解析为 v4.28.0。

相关 Actions:修复前的定时发布任务,日志显示选择 v4.28.0-beta.1 并输出 Build enabled: false,各平台构建及发布均被跳过。

本 PR 尚未触发安装包发布,也未修改现有 Release 或线上 stable manifest。


Checklist / 检查清单

  • This change is not a breaking change. / 此改动不是破坏性变更。手动 tag-poll 输入有意收紧为正式版本标签;原分支、commit 和预发布输入需迁移至 custom。
  • I have verified the change locally (and provided logs/screenshots above). / 我已在本地验证并在上方提供日志/截图。
  • If workflows are changed, I attached at least one related Actions run link. / 如果修改了工作流,我已附上至少一个相关 Actions 运行链接。
  • If dependencies are updated, lockfiles are updated accordingly. / 本 PR 未修改依赖或 lock 文件。
  • This PR does not include malicious code. / 此 PR 不包含恶意代码。

Summary by Sourcery

Restrict stable release polling to formal version tags and prevent prerelease sources from entering the stable channel.

Bug Fixes:

  • Ensure stable tag polling selects and publishes the latest formal vMAJOR.MINOR.PATCH release instead of being blocked by prerelease tags.
  • Reject prerelease tags, branches, and commit references supplied through manual stable tag-poll runs.

Enhancements:

  • Clarify workflow and development documentation for stable versus prerelease publishing, including behavior when releases already exist or no stable tags are available.

Tests:

  • Add regression coverage for stable tag selection, prerelease filtering, missing stable tags, manual override validation, and Latest release marking.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Soulter, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 days and 7 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@Soulter
Soulter merged commit 90eb6e8 into main Sep 12, 2026
4 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