Repository navigation
Commit 75c6fe9
committed
fix(ci): 发版工作流改用 RELEASE_TOKEN 以绕过 main 分支保护
前两次 Version & Release 均失败于 GH013:main 的 ruleset 强制
"Changes must be made through a pull request",把 semantic-release
自身的发版推送(chore(release) 提交 + CHANGELOG + tag → HEAD:main)
一并拦截。
修复:checkout 与 semantic-release 环境改用 secrets.RELEASE_TOKEN
(细粒度 PAT,Contents:RW,持有者为仓库 admin),配合 ruleset
Bypass list(Repository admin)实现发版链路的受控绕过;
未配置该 secret 时回退内置 token,行为与现状一致(不劣化)。
需要仓库侧配套(手工步骤):
1) 创建细粒度 PAT(仅 Entropydecrease 仓库,Contents: Read and write)
2) 仓库 Settings → Secrets → Actions 新建 RELEASE_TOKEN
3) main-protection ruleset → Bypass list 添加 Repository admin1 parent b1583c4 commit 75c6fe9
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | | - | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
0 commit comments