Repository navigation
ci: publish core releases from isolated release branches - #4217
Conversation
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
🟡 Changes recommended
预览技能仍硬编码旧主分支 PR,且测试未包含 PR 所声明的真实 pnpm pack 验证。
2 open findings
What changed in this PR
该 PR 将核心发布迁移至隔离的 release/* 分支,并通过固定 SHA、保存的 npm 输入及草稿 Release 支持同版本恢复。
Changes:
- 新增可恢复的 npm、原生安装包和 GitHub Release 发布流程。
- 增加版本计划、发布授权及完整性校验。
- 调整 CI、文档部署和 VS Code 发布联动。
| File | Description |
|---|---|
scripts/version-release.mjs |
生成固定发布计划。 |
scripts/release-trigger.test.mjs |
测试发布授权条件。 |
scripts/release-trigger.mjs |
校验版本 PR 与对应 CI。 |
scripts/is-release-sync.mjs |
识别 VS Code 元数据同步。 |
scripts/core-release.test.mjs |
覆盖发布及恢复场景。 |
scripts/core-release.mjs |
实现可恢复发布流程。 |
package.json |
接入版本计划脚本。 |
apps/kimi-code/test/scripts/native/release-artifacts.test.ts |
测试 ZIP 校验失败。 |
apps/kimi-code/scripts/native/produce-manifest.mjs |
校验 ZIP sidecar。 |
AGENTS.md |
记录发布约束。 |
.gitignore |
忽略本地发布输入。 |
.github/workflows/vscode-publish.yml |
跳过发布元数据同步。 |
.github/workflows/release.yml |
重构核心发布工作流。 |
.github/workflows/docs-deploy.yml |
调整文档部署触发器。 |
.github/workflows/ci.yml |
增加 release 分支 CI。 |
.github/workflows/_native-build.yml |
复用保存的发布输入。 |
.changeset/README.md |
编写发布与恢复手册。 |
.agents/skills/pre-changelog/SKILL.md |
调整预览目标分支说明。 |
.agents/skills/gen-changesets/SKILL.md |
更新 changeset 分支说明。 |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (args.includes('pack')) { | ||
| const pkg=JSON.parse(fs.readFileSync(path.join(value('--dir'),'package.json'))); | ||
| fs.writeFileSync(path.join(value('--pack-destination'),'package.tgz'),JSON.stringify(pkg));done(); |
|
|
||
| ### 1. Locate the release PR | ||
|
|
||
| Select the PR targeting the intended `release/*` branch, not the legacy main version PR. Report its latest head CI link and result alongside the preview. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c95ada1ba
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| ### 1. Locate the release PR | ||
|
|
||
| Select the PR targeting the intended `release/*` branch, not the legacy main version PR. Report its latest head CI link and result alongside the preview. |
There was a problem hiding this comment.
Select the release branch's generated version PR
The new instruction says to use the PR targeting release/*, but the next selection rule still requires headRefName: changeset-release/main. Once the obsolete main version PR is closed, this makes pre-changelog report that no release PR exists instead of previewing changeset-release/release/<cycle>, so maintainers can miss the required changelog and CI review. Update the selector to derive the expected head from the selected release branch.
AGENTS.md reference: AGENTS.md:L76-L79
Useful? React with 👍 / 👎.
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
| workflow_call: |
There was a problem hiding this comment.
Declare the removed VS Code publish triggers
Replacing both push and workflow_dispatch with only workflow_call removes main-based publication and the standalone manual recovery entry point for VS Code release maintainers, while the PR's behavior table says the workflow is unchanged and that syncing the version to main may still publish it. As gh workflow run --help confirms, a directly dispatched workflow must support on.workflow_dispatch; therefore the documented fallback no longer exists. Name this loss and its approved replacement in the behavior table rather than presenting the path as unchanged.
AGENTS.md reference: AGENTS.md:L104-L108
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d4e6fadb8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const entry = plan.packages.find(pkg => pkg.path === 'apps/vscode'); | ||
| if (!entry) { |
There was a problem hiding this comment.
Ensure private VS Code versions enter the release plan
When maintainers release a new extension version, this gate remains false because apps/vscode is private while .changeset/config.json does not enable privatePackages.version; Changesets therefore does not version that package by default (official configuration documentation). Consequently, version-release.mjs sees no VS Code version change and omits it from plan.packages; directly bumping package.json before running the command is also invisible because it is already present in the before snapshot. With the old push and manual triggers removed, marketplace publication is then silently skipped for every future extension release, so either enable private-package versioning or explicitly record an approved extension bump in the plan.
AGENTS.md reference: AGENTS.md:L122-L124
Useful? React with 👍 / 👎.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |


Requirement or Bug
只把核心仓及 VS Code 正式发布迁到 release 分支,保留现有发布实现。
Bug Reproduction Steps
N/A
Root Cause
N/A
Code Changes
Behavior Changes and Affected Users
验证:4 项发布入口场景测试(普通 push/其他分支/fork、不匹配 PR、CI 失败、同 SHA 校验);完整 lint 含 type-aware;actionlint(ci.yml 原有 if:false 提示除外);diff 检查。原 native 发布实现完整恢复,不再引入新的恢复测试框架。未进行真实 npm、市场、签名构建或 CDN 发布。
迁移顺序:先 main #4217,再 release #4218。两者是流程改造 PR,不会直接发布。之后审核生成的版本 PR、CLI/扩展版本说明和 CI,经批准才合入版本 PR。发布后正常回同步版本/锁文件/changelog/已消费 changeset,保留 main 的后续工作。
Checklist
/approve). N/A — 维护者直接要求的内部发布流程改造。gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update. 仓内发布说明已更新。