Repository navigation
fix(ci): tag 发布时创建 GitHub Release 并触发独立版打包 - #37
Open
HerbertGao wants to merge 5 commits into
Open
HerbertGao wants to merge 5 commits into
HerbertGao wants to merge 5 commits into
Conversation
release-prepare.yml 仍只在 Fission-AI/OpenSpec 上运行,不会创建 Release。 GITHUB_TOKEN 创建的 Release 不会触发其他 workflow,因此显式 dispatch binaries.yml。
workflow_dispatch 只是排队,发布 job 会在 SHA256SUMS 出现前成功。 改为调用 binaries.yml;已有完整 Release 则跳过。
全角括号紧挨 $asset 时,bash 3.2 会把它算进变量名。 "$releases.atom" 在 PowerShell 里是取属性,不是拼 .atom。
PowerShell 7 对非文本类型的 atom 响应返回 byte[],正则匹配不到标签。
本地发布列表按原始字节读取,避免 PowerShell 7 把 atom 当成字节数组。 测试改为按 UTF-8 读取安装脚本,并给 install.ps1 加上 BOM。
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.
Closes #36
问题
openspec-cn install只认带SHA256SUMS的 GitHub Release。本仓库的scripts/binary/和binaries.yml已经从上游同步,但发布时没有创建 Release,所以上传 job 从未运行。release-prepare.yml仍要求github.repository == 'Fission-AI/OpenSpec',在本仓库每次推送main都会 skip。实际发布入口是 tag 推送的release.yml,它只发 npm。改动
tag 推送时增加一个独立 job:
-的 tag 标为 prerelease,避免盖过 Latest。workflow_dispatch已有的binaries.yml,传入这个 tag。用
GITHUB_TOKEN创建的 Release 不会触发其他 workflow,所以不能只靠gh release create。workflow_dispatch是这个 token 可以触发的例外,binaries.yml也已经接受tag输入。没有改
release-prepare.yml。把它的仓库条件改过来会在每次推送main时运行 changesets,并依赖上游的 GitHub App 和 npm OIDC;这个仓库的发布路径是NPM_TOKEN加 tag。合并后
这个 workflow 随被推送的 tag 走。合并后需要再推一个包含本次提交的 tag,独立版文件才会出现。远程目前没有
v1.15.0tag。已有旧 tag 不会自动补文件。仓库的 Actions 权限需要允许
GITHUB_TOKEN写 contents 并触发 workflow。如果组织把 token 限制为只读,这个 job 会失败。未验证
没有在本仓库触发 tag 发布,也没有实际跑
bun scripts/binary/build.mjs。