fix(ci): tolerate missing 'v' in release branch name, warn on near-miss - #189
Open
ranxianglei wants to merge 1 commit into
Open
fix(ci): tolerate missing 'v' in release branch name, warn on near-miss#189ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
v0.1.44 was never published: its release branch was named 2026-08-21_release-0.1.44 (no 'v'), the check regex required release-v, so every publish step was silently skipped while the workflow reported success. Accept both variants, and emit a ::warning:: when a release-looking branch does not match.
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.
背景
v0.1.44 发布事故(2026-08-21):release 分支命名为
2026-08-21_release-0.1.44(漏了v),release.yml的检查正则要求release-v,判定非 release 合并 → 所有 publish 步骤被静默跳过,workflow 仍显示 success。master 停在 0.1.44,npm 停在 0.1.43,无人察觉。改动(
.github/workflows/release.yml的 check 步骤)release-v→release-(v)?[0-9]:同时接受YYYY-MM-DD_release-vX.Y.Z(文档规范)和YYYY-MM-DD_release-X.Y.Z(常见笔误变体)。release但不匹配版本模式时,输出::warning::(CI 日志醒目可见),提示改名重发——不再静默。验证
release-v0.1.45✓ /release-0.1.44✓ /fix-something→ not-release /release-notes-docs→ not-release + warning