Skip to content

fix(ci) - fix sha256 error#301

Merged
zevwings merged 1 commit into
masterfrom
bugfix/fix-sha256-error
Feb 28, 2026
Merged

fix(ci) - fix sha256 error#301
zevwings merged 1 commit into
masterfrom
bugfix/fix-sha256-error

Conversation

@zevwings
Copy link
Copy Markdown
Owner

PR Ready

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change which does not change functionality)
  • Hotfix (urgent fix for production issues)
  • Chore (maintenance tasks and non-functional changes)

Summary

在 CI 工作流中添加对 Windows 环境的 SHA256 校验处理,解决原有校验在 Windows Runner 上失败的问题。

Key Changes

  • 新增 OS 判断,仅在 Windows 环境执行特定逻辑
  • Windows 构建产物改为 .zip 并使用 PowerShell 计算 SHA256
  • 保留非 Windows 环境的 .tar.gz 与通用哈希命令
  • 添加中文注释解释 Windows 步骤

Changes

Bug Fixes

  • 修复 Windows Runner 上 SHA256 计算失败

Configuration

  • 更新 .github/workflows/release.yml 工作流配置

Impact Analysis

Affected Modules

Module Impact Severity
GitHub Actions 工作流 仅影响 CI/CD 流程的校验步骤,不会影响业务代码运行 low

Risk Assessment

Overall risk: medium

Risk factors:

  • PowerShell 在部分 Windows Runner 上可能不可用或执行失败
  • 不同平台的产物名称差异可能导致后续步骤引用错误

Mitigation:

  • 为 PowerShell 命令添加错误处理并在失败时提示
  • 在后续步骤中使用条件变量明确引用对应平台的产物名称
  • 提供跨平台回退哈希工具(如 shasum)作为备用

Testing Suggestions

  • 在 Windows Runner 上执行完整的 release 工作流,验证 .zip 文件生成及 SHA256 输出
  • 在 Linux/macOS Runner 上确认原有 .tar.gz 与 SHA256 仍正常工作
  • 检查后续步骤是否正确读取对应平台的 sha256 变量

Statistics

Metric Value
Total files 1
Additions +3
Deletions -1
Net change 2
Added files 0
Modified files 1
Deleted files 0
Renamed files 0

Review Info

  • Complexity: simple
  • Review priority: medium
  • Estimated review time: 15 minutes
  • Tags: ci, workflow, fix

@zevwings zevwings merged commit 21d18cc into master Feb 28, 2026
14 checks passed
@zevwings zevwings deleted the bugfix/fix-sha256-error branch February 28, 2026 00:51
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.

1 participant