Skip to content

fix(ci) - fix ci error#297

Merged
zevwings merged 1 commit into
masterfrom
bugfix/fix-ci-error
Feb 24, 2026
Merged

fix(ci) - fix ci error#297
zevwings merged 1 commit into
masterfrom
bugfix/fix-ci-error

Conversation

@zevwings
Copy link
Copy Markdown
Owner

PR Ready

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change which does not change functionality)
  • Hotfix (urgent fix for production issues)
  • Chore (maintenance tasks and non-functional changes)

Summary

修复 CI 流程,使 release 工作流在发布时实际生成并更新版本号。

Key Changes

  • 删除占位注释,加入实际执行的版本生成命令
  • 根据是否为 master 分支条件性添加 --master 标志
  • 加入 --update--ci 标志以更新版本文件并标识 CI 环境
  • 优化脚本缩进和换行,提高可读性

Changes

Bug Fixes

  • 在 release 工作流中实现版本号生成,解决原先仅有注释导致的 CI 错误

Others

  • 更新 GitHub Actions 脚本以调用 scripts/dev/py/dev.py

Impact Analysis

Affected Modules

Module Impact Severity
release 工作流 新增版本号生成步骤,依赖 dev.py 脚本 medium

Risk Assessment

Overall risk: medium

Risk factors:

  • dev.py 脚本若失败会导致发布工作流中断
  • 条件标志的双重检测可能在某些 runner 环境下产生意外行为

Mitigation:

  • 确保 dev.py 在失败时返回非零退出码并在工作流中捕获错误
  • 统一分支检测方式,避免重复或冲突的标志传递
  • 在工作流中添加步骤打印生成的版本号以便调试

Testing Suggestions

  • 在 master 分支运行 release 工作流,验证版本号正确生成并写入
  • 在非 master 分支运行,确认不传入 --master 标志且流程仍能成功
  • 模拟 dev.py 失败场景,确保工作流能够捕获并报告错误

Statistics

Metric Value
Total files 1
Additions +2
Deletions -2
Net change 0
Added files 0
Modified files 1
Deleted files 0
Renamed files 0

Review Info

  • Complexity: simple
  • Review priority: medium
  • Estimated review time: 10 minutes
  • Tags: ci, fix, workflow

@zevwings zevwings merged commit 806dd53 into master Feb 24, 2026
13 checks passed
@zevwings zevwings deleted the bugfix/fix-ci-error branch February 24, 2026 00:54
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