Skip to content

Conversation

@ThirteenLLB
Copy link
Contributor

@ThirteenLLB ThirteenLLB commented Feb 2, 2026

Summary

  • Auto-detect prerelease from tag name (-rc/-alpha/-beta) instead of relying on prerelease input
  • Set make_latest dynamically: stable versions become latest, prerelease versions do not
  • Update CHANGELOG.md

影响范围

使用 auto-release action 的仓库(修改后自动生效):

  • wuji-retargeting-private
  • wujihandros2
  • wuji-hand-description
  • isaaclab-sim
  • wujihandpy

Test plan

验证步骤:

  1. 合并 PR 后,在使用 auto-release 的仓库推送正式版本 tag(如 v0.3.0
  2. 确认 Release 页面显示为 "Latest",不显示 "Pre-release" 标签
  3. 推送预发布 tag(如 v0.3.1-rc.1),确认显示 "Pre-release" 标签

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changed

    • 自动从版本标签识别预发布(支持 -rc/-alpha/-beta,大小写不敏感),无需手动输入预发布标志。
    • 优化 latest 标记逻辑:稳定版本自动设为 latest,预发布版本不再被标记为 latest。
  • Removed

    • 删除了用于显式传入预发布标志的输入项。
    • 移除了消息通知步骤(相关通知流程已删除)。
  • Fixed

    • 修复了消息通知中换行处理的问题,确保通知有效构建。

Auto-detect prerelease from tag name (-rc/-alpha/-beta) instead of
relying on prerelease input. Stable versions become latest release,
prerelease versions do not.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

Walkthrough

将 auto-release Action 改为基于 Git 标签后缀(-rc/-alpha/-beta,大小写不敏感)自动识别预发布,依据该判断动态设置 make_latest(稳定版 true、预发布 false),并移除 Feishu 通知步骤;同时在 CHANGELOG 中记录该变更。

Changes

Cohort / File(s) Summary
发布 Action 配置
actions/auto-release/action.yml
移除 prerelease 输入参数;将预发布判定改为基于标签后缀启发式检测(-rc/-alpha/-beta,不区分大小写);根据检测结果动态设置 make_latest(预发布 -> false,稳定版 -> true);删除 Feishu 通知步骤。
更新日志
CHANGELOG.md
在 Unreleased 中新增 Changed 条目,记录自动检测预发布标签和动态设置 make_latest 的变更。

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Workflow as Workflow Trigger
    participant Action as auto-release Composite Action
    participant Git as Git Tag / Ref
    participant GHAPI as GitHub Releases API

    Workflow->>Action: invoke with tag ref
    Action->>Git: read tag name
    Note right of Action: heuristic: /-(rc|alpha|beta)$/i
    Action->>Action: set isPrerelease (true/false)
    Action->>GHAPI: create release (prerelease=isPrerelease, make_latest = !isPrerelease)
    GHAPI-->>Action: release created
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • chenjunnn
  • yuanyuanxin

Poem

🐰 标签轻语春风里,
我嗅出 RC、alpha、beta 的气息。
稳定登上 latest 的席,
预发布悄悄不抢位,
兔子跳跃,流程更利落。

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题遵循 Conventional Commits 格式,使用了 chore 类型和 auto-release 作用域,主题清晰具体地描述了主要变更(设置正式版本自动为 latest release)。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Changelog ✅ Passed 该PR包含的面向用户的更改已在CHANGELOG.md中完整记录,包括预发布版本自动检测逻辑改变、make_latest动态设置、prerelease输入参数移除和Feishu卡片换行修复。
Pr Description ✅ Passed PR描述包含具体的测试计划,且源分支为'chore/prerelease-logic',工作项参考要求被豁免。
Branch Name ✅ Passed 源分支名称 chore/prerelease-logic 符合自定义检查中定义的Chore分支命名规范 chore/<description>

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/prerelease-logic

Comment @coderabbitai help to get the list of available commands and usage tips.

@ThirteenLLB
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
actions/auto-release/action.yml (1)

17-20: 🛠️ Refactor suggestion | 🟠 Major

prerelease 输入参数现已失效,应移除或标记为废弃。

代码在 Line 186 改为从 tag 名称自动检测预发布版本,但 prerelease 输入参数仍然保留在定义中。这会导致:

  1. 用户设置此参数时不会产生任何效果,造成困惑
  2. Line 49 的 INPUT_PRERELEASE 环境变量也成为死代码

建议移除该输入参数,或在描述中明确标注为"已废弃,将被忽略"。

♻️ 建议的修改方案

方案 1:移除废弃参数

-  prerelease:
-    description: '是否标记为预发布'
-    required: false
-    default: 'false'

同时移除 env 中的引用:

       env:
         CHANGELOG_PATH: ${{ inputs.changelog-path }}
         INPUT_DRAFT: ${{ inputs.draft }}
-        INPUT_PRERELEASE: ${{ inputs.prerelease }}

方案 2:保留但标记为废弃

   prerelease:
-    description: '是否标记为预发布'
+    description: '(已废弃,将被忽略)预发布状态现从 tag 名称自动检测 (-rc/-alpha/-beta)'
     required: false
     default: 'false'
+    deprecationMessage: '此参数已废弃,预发布状态现从 tag 名称自动检测'

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 3, 2026
The prerelease status is now auto-detected from the tag name,
making the prerelease input parameter obsolete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ThirteenLLB ThirteenLLB requested a review from chenjunnn February 3, 2026 03:03
@ThirteenLLB ThirteenLLB merged commit 8145fcb into main Feb 3, 2026
1 check passed
@ThirteenLLB ThirteenLLB deleted the chore/prerelease-logic branch February 3, 2026 03:27
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.

2 participants