ci: cut the GitHub Release, and fix the Windows registry rename race - #3
Merged
Merged
Conversation
The publish workflow only ran npm publish. Tags for 0.3.0, 0.4.0 and 0.5.0 existed and all three were on npm, but the repository page still advertised v0.2.0 as Latest — three days stale, and reading like an abandoned project to anyone landing on it. The in-app update check points at that same page. The step runs after npm publish, so a Release never announces a version nobody can install yet. Notes come from the CHANGELOG section for the tag's version, which is written before the tag exists; an empty section fails the step rather than publishing a Release with nothing in it. --verify-tag refuses a tag that is not on the remote. contents: write is the one permission this adds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CI on windows-latest failed 2 runs out of 12 with EPERM: operation not permitted, rename '...tmp' -> 'registry.json' Every command rebuilds registry.json after releasing the override lock, so two concurrent `describe` calls race on that one rename. POSIX swaps the inode and always lands; Windows refuses to rename onto a file another process has open. The command then reported failure for a write that had already succeeded. Short bounded retries, because nothing holds this file for long. A lock is the heavier answer for a file that is a rebuildable cache — and overrides.json, the one holding data that cannot be rebuilt, already has one. The existing "parallel metadata writes keep every edit" test is the regression test; it is the one that was failing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Owner
Author
|
补一个提交:CI 在 windows-latest 上挂了,查出来是长期存在的间歇性竞态,不是这个 PR 引入的(近 12 次 CI 里挂过 2 次)。 每条命令跑完都会重建 改法是有上限的短重试——这个文件没人会长时间持有。加锁是更重的答案,而且对一个可重建的缓存不值得;真正不可重建的 回归测试就是那条挂掉的 本地 98/98, |
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.
仓库首页一直写着
Latest: v0.2.0 · 3 days ago,而 npm 上早就有 0.3.0 / 0.4.0 / 0.5.0 了。原因:发布流程只做
npm publish,从来没有创建 GitHub Release 的步骤。标签推上去了,Release 没建。落到访客眼里就是一个停更三天的项目——而且代码里checkSelfUpdate给用户的releaseUrl指的正是这个页面。(0.3.0 / 0.4.0 / 0.5.0 三条 Release 已手动补齐,这个 PR 是把坑堵上,以后不用再补。)
改了什么
在
npm publish之后加一步gh release create:--verify-tag拒绝远端不存在的标签contents: write一项验证
awk 抽取逻辑在真实 CHANGELOG 上跑过:
YAML 无 tab 缩进。
🤖 Generated with Claude Code