Skip to content

修复:按应用版本生成预发布标签#50

Merged
amazing-fish merged 1 commit into
mainfrom
fix/issue-49-versioned-prerelease-tag
Jul 16, 2026
Merged

修复:按应用版本生成预发布标签#50
amazing-fish merged 1 commit into
mainfrom
fix/issue-49-versioned-prerelease-tag

Conversation

@amazing-fish

Copy link
Copy Markdown
Owner

Refs #49

原行为

  • 推送到 main 后固定移动 pre-main 标签。
  • Pre-release 固定为 TODOList Main Preview,标签无法体现 APP_VERSION

新行为

  • main 构建从 todo_app/constants.py 解析 APP_VERSION
  • pre 与版本号直接组合:当前 1.7.13 对应 pre1.7.13;未来 1.7.14 对应 pre1.7.14
  • 标签更新与 Pre-release 共用 main_preview.release_tag 输出,避免命名分叉。
  • Pre-release 名称显示版本号,并继续设置 prerelease: truemake_latest: false
  • 保留远端 main 新鲜度守卫,旧任务不能回退当前版本的预发布。
  • README 与 anchor.md 已同步。
  • 不修改应用版本号或应用功能。

三种触发方式

触发方式 Artifact Release 标签
push main 上传,保留 7 天 更新 pre<APP_VERSION> Pre-release 仅允许移动当前 pre<APP_VERSION>
workflow_dispatch 上传,保留 7 天 不发布 不修改
push v* 上传,保留 7 天 正式 Release 不修改已推送的正式标签

标签边界

  • 工作流不再引用或更新 pre-main
  • v* 正式标签仍由发布者显式推送且保持不可变。
  • pre<APP_VERSION> 是版本化预发布标签;版本号不变时可随新 main 提交更新。
  • 不增加 pre* push 触发,避免标签更新递归触发构建。
  • 已存在的错误 pre-main 标签和 Release 暂不删除,需另行明确授权。

验证

  • PyYAML BaseLoader 解析:通过。
  • 触发器 main / v*:通过。
  • APP_VERSION 解析、pre 前缀映射和输出复用断言:通过。
  • main 新鲜度守卫断言:通过。
  • 正式 v* Release 条件保持不变:通过。
  • retention-days: 7:通过。
  • 工作流、README、锚点中不存在 pre-main:通过。
  • compare 仅包含工作流、README 和 anchor.md,共 24 行变动。
  • 未在 PR 阶段执行 Windows PyInstaller;合入后的 main run 将验证 pre1.7.13 和 Release Asset。

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 979534a98a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@amazing-fish
amazing-fish merged commit e173038 into main Jul 16, 2026
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