Skip to content

Commit 3459bbb

Browse files
authored
ci: Fix Windows release attestation by writing CRLF checksums (#571)
## Summary Windows release jobs fail at `actions/attest`: its parser splits `checksums.txt` on `os.EOL` (`'\r\n'` on Windows), but the Generate-checksums step writes LF-only. The whole file becomes a single record whose subject name exceeds 256 chars. Pipe through `sed 's/$/\r/'` on the Windows branch to produce CRLF. Linux and macOS unchanged. Confirmed on a Windows runner: `sha256sum` on Git Bash writes LF only, the base64 round-trip preserves it, and Node `os.EOL` on the runner is `"\r\n"`. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > CI-only line-ending tweak on the Windows checksum branch; no runtime SDK or security logic changes. > > **Overview** > Fixes **Windows release jobs** failing at `actions/attest` when parsing `checksums.txt`. > > On the Windows matrix leg, the **Generate checksums file** step now pipes decoded hashes through `sed 's/$/\r/'` so each line ends with **CRLF**, matching how `actions/attest` splits on `os.EOL` (`\r\n`) on Windows. LF-only output was treated as one record and blew past subject name limits. **Linux and macOS** checksum generation is unchanged. > > The same one-line change is applied everywhere that Windows hash output is written: `manual-sdk-release-artifacts.yml` and four release jobs in `release-please.yml` (client, server, redis, dynamodb). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 840d153. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent a2e75c6 commit 3459bbb

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/manual-sdk-release-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
if [ -n "${HASHES_LINUX}" ]; then
7676
echo "${HASHES_LINUX}" | $B64_DECODE > checksums.txt
7777
elif [ -n "${HASHES_WINDOWS}" ]; then
78-
echo "${HASHES_WINDOWS}" | $B64_DECODE > checksums.txt
78+
echo "${HASHES_WINDOWS}" | $B64_DECODE | sed 's/$/\r/' > checksums.txt
7979
elif [ -n "${HASHES_MACOS}" ]; then
8080
echo "${HASHES_MACOS}" | $B64_DECODE > checksums.txt
8181
fi

.github/workflows/release-please.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
if [ -n "${HASHES_LINUX}" ]; then
6767
echo "${HASHES_LINUX}" | $B64_DECODE > checksums.txt
6868
elif [ -n "${HASHES_WINDOWS}" ]; then
69-
echo "${HASHES_WINDOWS}" | $B64_DECODE > checksums.txt
69+
echo "${HASHES_WINDOWS}" | $B64_DECODE | sed 's/$/\r/' > checksums.txt
7070
elif [ -n "${HASHES_MACOS}" ]; then
7171
echo "${HASHES_MACOS}" | $B64_DECODE > checksums.txt
7272
fi
@@ -145,7 +145,7 @@ jobs:
145145
if [ -n "${HASHES_LINUX}" ]; then
146146
echo "${HASHES_LINUX}" | $B64_DECODE > checksums.txt
147147
elif [ -n "${HASHES_WINDOWS}" ]; then
148-
echo "${HASHES_WINDOWS}" | $B64_DECODE > checksums.txt
148+
echo "${HASHES_WINDOWS}" | $B64_DECODE | sed 's/$/\r/' > checksums.txt
149149
elif [ -n "${HASHES_MACOS}" ]; then
150150
echo "${HASHES_MACOS}" | $B64_DECODE > checksums.txt
151151
fi
@@ -224,7 +224,7 @@ jobs:
224224
if [ -n "${HASHES_LINUX}" ]; then
225225
echo "${HASHES_LINUX}" | $B64_DECODE > checksums.txt
226226
elif [ -n "${HASHES_WINDOWS}" ]; then
227-
echo "${HASHES_WINDOWS}" | $B64_DECODE > checksums.txt
227+
echo "${HASHES_WINDOWS}" | $B64_DECODE | sed 's/$/\r/' > checksums.txt
228228
elif [ -n "${HASHES_MACOS}" ]; then
229229
echo "${HASHES_MACOS}" | $B64_DECODE > checksums.txt
230230
fi
@@ -303,7 +303,7 @@ jobs:
303303
if [ -n "${HASHES_LINUX}" ]; then
304304
echo "${HASHES_LINUX}" | $B64_DECODE > checksums.txt
305305
elif [ -n "${HASHES_WINDOWS}" ]; then
306-
echo "${HASHES_WINDOWS}" | $B64_DECODE > checksums.txt
306+
echo "${HASHES_WINDOWS}" | $B64_DECODE | sed 's/$/\r/' > checksums.txt
307307
elif [ -n "${HASHES_MACOS}" ]; then
308308
echo "${HASHES_MACOS}" | $B64_DECODE > checksums.txt
309309
fi

0 commit comments

Comments
 (0)