ci: publish stable Workspace CLI releases as latest - #7
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
必要性
univer-workspace的 release workflow 需要把默认分支上的稳定vX.Y.Ztag 识别为latest。版本线属于发布者选择,CI 负责验证标准 SemVer、tag/source 一致性和制品合同。正确性
vX.Y.Ztag push 选择latest;预发布 tag 不进入稳定发布 workflow。v0.50.0可生成univer-workspace-cli@0.50.0。vX.Y.Ztag。长期正确性
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