Skip to content

Commit ae745ff

Browse files
author
Sisyphus Agent
committed
fix: use PowerShell Get-FileHash for Windows checksum generation
- Replace certutil with PowerShell Get-FileHash command - Get-FileHash is the standard Windows tool for hash generation - Output format matches sha256sum format (hash + filename) - Remove shell: bash to allow native shell execution on each platform
1 parent bebc27b commit ae745ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,9 @@ jobs:
176176
177177
- name: Create checksums
178178
working-directory: oho/dist
179-
shell: bash
180179
run: |
181180
if [ "${{ matrix.goos }}" == "windows" ]; then
182-
certutil -hashfile ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} SHA256 | grep -v "hash" | grep -v "CertUtil" | tr -d '\r' > ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}.sha256
181+
powershell -Command "Get-FileHash -Algorithm SHA256 '${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}' | ForEach-Object { `$_.Hash + ' ' + `$_.Path }" > ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}.sha256
183182
else
184183
sha256sum ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} > ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}.sha256
185184
fi

0 commit comments

Comments
 (0)