Skip to content

fix: 修复 GitHub Actions Release 流水线配置隐患#126

Merged
minorcell merged 1 commit into
1024XEngineer:mainfrom
pionxe:main
Apr 3, 2026
Merged

fix: 修复 GitHub Actions Release 流水线配置隐患#126
minorcell merged 1 commit into
1024XEngineer:mainfrom
pionxe:main

Conversation

@pionxe

@pionxe pionxe commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

目的 / Purpose

本 PR 旨在修复自动化发版流水线(GitHub Actions + GoReleaser)中存在的鉴权丢失与环境版本硬编码问题,确保官方在触发打 Tag 发版时能够顺利、无误地创建 Release 产物。

变更内容 / Changes

  • 补全鉴权令牌: 在 release.yml 的 GoReleaser 步骤中显式注入了 ${{ secrets.GITHUB_TOKEN }}。修复了因缺乏该内置权限,导致 GoReleaser 无法在当前仓库创建 Release 及挂载产物的致命问题 (Error 403 / exit code 1)。
  • 统一 Go 环境版本: 移除了 release.yml 中硬编码的 go-version: '1.22',改为官方推荐的 go-version-file: 'go.mod' 配置。这使得 CI 编译环境能够始终与代码底座 (Go 1.25.0) 保持严格的动态一致,彻底杜绝了因跨版本编译可能引发的语法报错或隐患。

@codecov

codecov Bot commented Apr 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@minorcell minorcell merged commit 4124cbd into 1024XEngineer:main Apr 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants