Skip to content

Commit f9463d5

Browse files
fix(ci): write Windows sha256 as LF
PowerShell Out-File emitted CRLF, so 'sha256sum -c' / 'shasum -c' choked on the trailing CR in the filename (cross-platform verify of the Windows artifact failed). Use [IO.File]::WriteAllText with a LF and no BOM, matching the unix shasum sidecar format. Binaries were always intact; only the sidecar was malformed.
1 parent a31e955 commit f9463d5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ jobs:
6767
Copy-Item "target/${{ matrix.target }}/release/mcp-loadtest.exe" $dir
6868
Copy-Item README.md, LICENSE-MIT, LICENSE-APACHE $dir
6969
Compress-Archive -Path $dir -DestinationPath "$dir.zip"
70-
"$((Get-FileHash "$dir.zip" -Algorithm SHA256).Hash.ToLower()) $dir.zip" |
71-
Out-File "$dir.zip.sha256" -Encoding ascii
70+
$h = (Get-FileHash "$dir.zip" -Algorithm SHA256).Hash.ToLower()
71+
# LF, no BOM, "<hash> <name>" — matches the unix `shasum` sidecar so
72+
# `sha256sum -c` works cross-platform (Out-File would emit CRLF).
73+
[IO.File]::WriteAllText((Join-Path $PWD "$dir.zip.sha256"), "$h $dir.zip`n")
7274
7375
- name: Attach to GitHub Release
7476
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)