Repository navigation
ci(release): 改为 tag 触发发版,修复 ruleset 阻断 GITHUB_TOKEN 推送 - #12
Merged
Merged
Conversation
对齐 better-nav 的发版模型,修复一个会阻断下次发版的回归。 问题:main ruleset 要求「Lint / Typecheck / Test」必需检查,而 release-it 在 CI 里用 GITHUB_TOKEN 推 main 时不会触发任何 workflow(该检查永远出不来), github-actions[bot] 又不在 bypass 名单 → 推送必被 ruleset 拒绝,发版失败。 改动: - release.yml:workflow_dispatch → push tag v*;校验 tag 落点与版本一致 → lint/typecheck/test/build 复检 → 取 CHANGELOG 段落创建 GitHub Release - .release-it.json:移除 github 插件(Release 创建交给 tag 工作流), 加 requireBranch: main 与 annotated tag - 发版推送改由 owner 本地完成(pnpm release,owner 有 bypass always) - 文档同步:deployment.md / AGENTS.md / backlog.md / sync-openapi-version.mjs 注释 Co-authored-by: pi <noreply@pi.dev> Assisted-by: pi:step-5-preview
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
问题
当前
release.yml是workflow_dispatch,让 release-it 在 CI 里用GITHUB_TOKEN直接推 main。但 main ruleset 要求Lint / Typecheck / Test必需检查,而 GITHUB_TOKEN 推送不会触发任何 workflow(该检查永远出不来),github-actions[bot]又不在 bypass 名单 → 推送必被 ruleset 拒绝,下次发版会失败。(这是加上 ruleset 后引入的回归:最后一次发版 v3.0.0 是 2026-11-10 由 github-actions[bot] 完成的,早于 ruleset,所以还没暴露。)
方案(对齐 better-nav)
发版推送改本地 owner 身份完成(owner 有 bypass always),CI 只监听 tag 做校验 + 发 Release:
本地 lint/typecheck/test 通过;workflow YAML 结构与 CHANGELOG 提取逻辑均已验证。