From d4f1e6046206e4e7efc8ec826ec814b2f6b82613 Mon Sep 17 00:00:00 2001 From: bigduu Date: Tue, 14 Jul 2026 23:58:46 +0800 Subject: [PATCH] fix(release): write the windows .sha256 sidecar with LF, not CRLF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set-Content ends the line CRLF, so `shasum -c` / `sha256sum -c` on unix read the filename as `...zip\r` and fail with "No such file" — caught verifying the v0.1.0 assets. The hash value itself was correct (the release job's own awk field-split was unaffected); only unix-side `-c` verification of the sidecar broke. Claude-Session: https://claude.ai/code/session_014iw5PBsSzDFHus1GfkAK4y --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f90d2b..3ab8cc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -206,7 +206,11 @@ jobs: Copy-Item "target/x86_64-pc-windows-msvc/release/magpie.exe" -Destination "magpie.exe" Compress-Archive -Path "magpie.exe" -DestinationPath $asset -Force $hash = (Get-FileHash -Algorithm SHA256 $asset).Hash.ToLower() - "$hash $asset" | Set-Content -Encoding ascii "$asset.sha256" + # WriteAllText with an explicit LF, NOT Set-Content: Set-Content + # ends the line CRLF, and `shasum -c`/`sha256sum -c` on unix then + # look for a filename ending in a literal \r ("No such file") — + # caught verifying the v0.1.0 release assets. + [IO.File]::WriteAllText("$asset.sha256", "$hash $asset`n") Write-Host "Built $asset — sha256 $hash" - uses: actions/upload-artifact@v4