release-please 自动版本管理

Conventional Commits 驱动的自动版本管理:commit 类型决定版本 bump、自动生成 CHANGELOG 和 Release PR。

#type / howto #status / growing #tech / ops #resource / github-actions

[!info] related notes

release-please 自动版本管理

完整流程

commit (feat/fix) → 合并到 main
  → release-please 创建 Release PR(版本 bump + CHANGELOG)
  → 维护者合并 Release PR
  → 创建 GitHub Release + tag
  → tag push 触发 Docker 构建
  → Watchtower 自动部署

Commit 类型与版本

类型版本 bump示例
feat:minor (0.1→0.2)feat: add training plan
fix:patch (0.2→0.2.1)fix: login redirect
feat!:major (0.2→1.0)feat!: new API format
docs:, chore:不 bumpdocs: update README

配置

{
  "include-v-in-tag": true,
  "packages": {
    ".": { "release-type": "node" }
  }
}

为什么需要 PAT

release-please 需要 PAT 而不是默认 GITHUB_TOKEN,因为 GITHUB_TOKEN 创建的事件不会触发其他 workflow。

创建于 2026/6/25 更新于 2026/6/25