Skip to content

ci: publish tested commits from release branches - #4168

Open
wbxl2000 wants to merge 2 commits into
mainfrom
qer/release-branch-workflow
Open

wbxl2000 wants to merge 2 commits into
mainfrom
qer/release-branch-workflow

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Requirement or Bug

将每周发布改为 release 分支维护版本 PR,通过最终提交的 CI 后再明确触发发布。

Bug Reproduction Steps

N/A — 发布流程调整。

Root Cause

N/A — 发布流程调整。

Code Changes

main                    → 积累 changeset,不生成版本 PR、不发布
release/* push / prepare → 更新 ci: release packages,并显式启动版本 PR 的 CI
版本 PR 合并             → 写入版本、CHANGELOG、已消费文件及 release-plan.json
publish + expected_sha  → 校验分支、清单、最终提交 CI 和 tag → npm + native → 公开 Release

发布清单记录本次包版本,native 构建不再依赖本轮 npm 是否刚发布成功。GitHub Release 先建草稿、完成附件后公开;失败可在同一 SHA 重试,已有 tag 指向其他提交时拒绝。npm Trusted Publishing 继续使用原 release.yml。

VS Code 改为对已验证的 release 提交手动发布,保留逐平台补传检查。文档改为 main 上 docs 更新后部署。同步维护发布说明与相关技能文档;发布后通过普通 PR 同步版本记录,保留 main 的新 changeset 和延期功能记录。

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
main 的版本 PR 每次 main push 自动更新 main 仅积累 changeset 发布维护者 release 分支 prepare
npm/native 发布 main 的 Changesets action 自动触发 release 分支 publish,要求完整 SHA 和该提交 CI 成功 发布维护者 同一入口重试;取消 main 自动发布为本次明确需求
发布失败重试 native 依赖本轮 npm published 输出 发布清单驱动,保留草稿直至附件完成 发布维护者 同一 SHA 重跑;源码修改须新版本
VS Code 发布 main 版本变化自动发,手动入口不限制分支 仅手动发布通过 CI 且清单包含扩展的 release 提交 扩展维护者 同一入口按平台补传
文档部署 由 Release 调用,部署只允许 main main 文档更新自动部署,保留手动入口 文档维护者 手动 docs-deploy
CLI/SDK 运行行为 原有行为 未改运行时代码 最终用户 N/A

验证:

  • node --test scripts/release.test.mjs:8/8 通过,覆盖发布限制、过期清单、CI 状态、tag 冲突、草稿重试、后续版本 PR 和下一周期。
  • 新增脚本 oxlint --type-aware:通过,无警告。
  • actionlint:修改的发布工作流通过;ci.yml 原有 Windows job 的 if: false 警告保留,忽略该既有警告后通过。
  • 临时 Git 仓库使用真实 Changesets 2.30.0 验证版本消费与版本提交同步:本周文件删除,下周新增文件保留。
  • 未执行实际 npm、GitHub Release、市场、签名打包或 CDN 发布;外部凭据和实际发布链尚未端到端验证。

首次切换时关闭旧 main 版本 PR、创建 release 分支、实际发布与发布后同步均留给后续操作,本 PR 不执行这些操作。配套 Desktop 改造在 kimi-code-app 单独提交。

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve). N/A — 已确认的仓库发布流程改造,无关联 issue。
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR. 仅维护者发布流程变化,按已确认方案移除 main 自动发布;无最终用户运行行为变化。
  • Ran gen-changesets skill, or this PR needs no changeset. CI 和维护文档变更,无需 changeset。
  • Ran gen-docs skill, or this PR needs no doc update. 无产品使用方式变化;已更新维护者发布说明。

Copilot AI balanced review requested due to automatic review settings October 10, 2026 08:47
@changeset-bot

changeset-bot Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f7912f7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T09:01:22.898943Z f7912f7 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@f7912f7
npx https://pkg.pr.new/@moonshot-ai/kimi-code@f7912f7

commit: f7912f7

Copilot AI 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.

🔵 Needs a closer look

发布链涉及 npm、签名构建、市场和 GitHub Release,尚未经过真实外部发布端到端验证。

0 open findings

What changed in this PR

将发布流程迁移至 release/* 分支,并要求基于通过 CI 的明确提交手动发布。

Changes:

  • 新增发布计划、提交校验、草稿 Release 与重试机制。
  • 调整 npm、native、VS Code 及文档发布工作流。
  • 补充发布脚本测试和维护者文档。
File Description
scripts/​version-release.mjs 生成并增量维护发布计划。
scripts/​release.mjs 校验提交并管理 tag、草稿及公开 Release。
scripts/​release.test.mjs 覆盖发布限制、冲突和重试场景。
.github/​workflows/​release.yml 拆分版本 PR 准备与手动发布。
.github/​workflows/​vscode-publish.yml 限制扩展从已验证发布提交手动发布。
.github/​workflows/​docs-deploy.yml 改为 main 文档变更触发部署。
.github/​workflows/​ci.yml 覆盖 release 分支及发布脚本测试。
.changeset/​README.md 记录新的维护者发布流程。
AGENTS.md 添加 release 分支工作流约束。
.agents/​skills/​sync-changelog/​SKILL.md 更新发布后 changelog 同步时机。
.agents/​skills/​pre-changelog/​SKILL.md 支持选择具体 release 周期。
.agents/​skills/​gen-changesets/​SKILL.md 更新版本 PR 的分支说明。

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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