fix(ci): CI 固定 Go 1.22 低于 go.mod 要求的 1.26.1,改用 go-version-file 跟随 go.mod #419
Loading…
Reference in New Issue
No description provided.
Delete Branch "Taoyouce/gitlink-cli:fix/ci-go-version"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
.gitea/workflows/ci.yml与.github/workflows/release.yml中 setup-go 固定go-version: '1.22',而go.mod已声明go 1.26.1——低于模块要求的工具链会直接构建失败(go.mod requires go >= 1.26.1),即 CI/发布流水线与代码库实际要求脱节。仓库内.github/workflows/test.yml已经采用了正确写法(go-version-file: go.mod),本 PR 将其余两处对齐。修复
两个 workflow 的 setup-go 均改为:
此后 Go 版本随 go.mod 单一事实来源自动跟随,未来升级 Go 无需再改 CI 配置。2 行改动,零功能风险。