Skip to content

Commit c5a62dc

Browse files
committed
feat(ci): Produce SHA256 checksums in release workflow
1 parent c4cde07 commit c5a62dc

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,18 @@ jobs:
193193
with:
194194
name: fibratus-${{ steps.get_version.outputs.VERSION }}-slim-amd64.msi
195195
path: build
196+
- name: Generate SHA256 checksums
197+
shell: pwsh
198+
run: |
199+
$version = "${{ steps.get_version.outputs.VERSION }}"
200+
$files = @(
201+
"fibratus-$version-amd64.msi",
202+
"fibratus-$version-slim-amd64.msi"
203+
)
204+
foreach ($file in $files) {
205+
$hash = (Get-FileHash "build\$file" -Algorithm SHA256).Hash.ToLower()
206+
"$hash $file" | Out-File -FilePath "build\$file.sha256" -Encoding utf8
207+
}
196208
- name: Release
197209
uses: softprops/action-gh-release@v2
198210
if: startsWith(github.ref, 'refs/tags/')
@@ -201,6 +213,8 @@ jobs:
201213
prerelease: true
202214
files: |
203215
build/fibratus-${{ steps.get_version.outputs.VERSION }}-amd64.msi
216+
build/fibratus-${{ steps.get_version.outputs.VERSION }}-amd64.msi.sha256
204217
build/fibratus-${{ steps.get_version.outputs.VERSION }}-slim-amd64.msi
218+
build/fibratus-${{ steps.get_version.outputs.VERSION }}-slim-amd64.msi.sha256
205219
env:
206220
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)