Skip to content

ci: publish stable Workspace CLI releases as latest - #7

Merged
hexf00 merged 2 commits into
mainfrom
fix/workspace-cli-latest
Aug 20, 2026
Merged

ci: publish stable Workspace CLI releases as latest#7
hexf00 merged 2 commits into
mainfrom
fix/workspace-cli-latest

Conversation

@hexf00

@hexf00 hexf00 commented Aug 20, 2026

Copy link
Copy Markdown
Member

必要性

univer-workspace 的 release workflow 需要把默认分支上的稳定 vX.Y.Z tag 识别为 latest。版本线属于发布者选择,CI 负责验证标准 SemVer、tag/source 一致性和制品合同。

正确性

  • 稳定 vX.Y.Z tag push 选择 latest;预发布 tag 不进入稳定发布 workflow。
  • release policy 接受任意 SemVer 版本线,v0.50.0 可生成 univer-workspace-cli@0.50.0
  • main 历史归属、单一 SDK baseline、reviewed tarball integrity 和 source SHA 绑定保持生效。
  • Workspace 部署继续使用同一个稳定 vX.Y.Z tag。

长期正确性

CI 使用通用 SemVer 合同,不再保存产品版本线。稳定 tag 是 CLI 制品与 Workspace 镜像共享的唯一源码坐标;公开 npm Promotion 继续由独立流程负责。

测试审计

删除 scripts/release/workflow-contract.test.mjs。该文件通过正则匹配 YAML 文本、命令排版和 manifest 字段,无法执行 workflow 行为,重复发布策略且随重构破碎,不符合必要性、正确性和长期正确性。

保留:

  • policy.test.mjs:执行 SemVer、channel、触发上下文和 manifest 合同。
  • publisher.test.mjs:执行 tarball integrity 与 workflow source 绑定合同。

验证

  • node --test scripts/release/policy.test.mjs:6/6 通过,包含 0.50.0
  • PR CI:API contract、typecheck、tests、build、CLI package/smoke、production import 全部通过

@hexf00
hexf00 marked this pull request as ready for review August 20, 2026 07:29
@hexf00
hexf00 merged commit 7ca03c0 into main Aug 20, 2026
1 check passed
@hexf00
hexf00 deleted the fix/workspace-cli-latest branch August 20, 2026 07:29
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