feat(ci): 引入三平台 GitHub Actions 构建与 provider 瞬断重试 - #274
Open
linanwanttodo wants to merge 6 commits into
Open
Conversation
1. CI 构建与发布流水线(对齐 fork 已验证配置)
- 新增 .github/workflows/build.yml:Linux(tar.gz) + macOS(tar.gz) + Windows(.zip)
三平台绿色版构建,main 分支自动创建 GitHub Release 并生成 update.json 更新清单
- Taskfile.yml / build/*:补齐绿色版打包任务及模板
(build/deb/、nfpm.yaml、windows NSIS 配置)
- 版本号保持 0.0.45,未改动任何版本信息与仓库归属(leookun)
2. provider 请求瞬断服务端重试(兼容 opencode/zen 等不稳定上游)
- retry.go:DNS 解析失败(EAI_AGAIN)、连接重置、5xx 及被代理
包装成 400 的 "Upstream request failed" 类瞬断,在请求建立阶段
指数退避重试(最多 10 次,800ms 起、上限 20s)
- retry_test.go:新增 7 个行为用例覆盖重试/不重试路径
3. 其他
- .gitignore:忽略 .idea 与 dev.sh
darwin:package:archive 此前标记为 internal: true,GitHub Actions 直接调用时报 "Task is internal"(exit 202)导致 macOS 构建失败;去掉该标记后可从命令行调用, 内部 build/codesign/archive 链路不受影响。
… Taskfile for Docker image builds, and enhance CI workflows for release management. Clean up .gitignore and remove unused files.
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.
Summary
三平台 CI 构建(
.github/workflows/build.yml).tar.gz,apt 依赖安装带重试.tar.gz,brew + go tools 安装.zip,protoc 走 GitHub release 直下(避开 Chocolatey 503)update.json清单并发布 GitHub Release(幂等:已存在则跳过)provider 瞬断重试(
internal/backend/agent/model/retry.go+retry_test.go)macOS 打包修复(
build/darwin/Taskfile.yml)darwin:package:archive移除internal: true标记,修复 CI 调用时报"Task is internal"(exit 202)导致的 macOS 构建失败
产物与现有官方格式一致:
*-{linux-amd64,macos-amd64,macos-arm64,windows-amd64},均为绿色版便携包。Changed Files (19)
.github/workflows/build.ymlinternal/backend/agent/model/retry.gointernal/backend/agent/model/retry_test.gobuild/linux/Taskfile.ymlbuild/windows/Taskfile.ymlbuild/darwin/Taskfile.ymlTaskfile.yml/build/Taskfile.yml.gitignore.idea/、dev.shTest Plan
*-{linux-amd64,macos-amd64,macos-arm64,windows-amd64}retry_test.go)