Skip to content

Commit 68c748f

Browse files
authored
fix: hash computation in release (#5605)
1 parent faf1ba9 commit 68c748f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ jobs:
252252
$orig = Get-ChildItem target/distrib -Filter $_.Name
253253
if ($orig) { Copy-Item $_.FullName $orig.FullName -Force }
254254
}
255+
# Recompute .sha256 files for all modified archives (zip and msi)
256+
# The signing step changes the file content, so checksums computed before signing are stale
257+
foreach ($artifact in (Get-ChildItem target/distrib -Filter "*.zip") + (Get-ChildItem target/distrib -Filter "*.msi")) {
258+
$hash = (Get-FileHash $artifact.FullName -Algorithm SHA256).Hash.ToLower()
259+
"$hash *$($artifact.Name)" | Set-Content "$($artifact.FullName).sha256" -NoNewline
260+
}
255261
- name: Attest Builds
256262
id: attest
257263
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0

0 commit comments

Comments
 (0)