Skip to content

Commit

Permalink
ci: release a checksums file with SHA256 hashes for release assets (#…
Browse files Browse the repository at this point in the history
…2227)

* ci: generate sha256 checksums for release assets

Signed-off-by: Vishwas Rajashekar <[email protected]>

* ci: add wildcard character prefix to filenames in checksum file

Signed-off-by: Vishwas Rajashekar <[email protected]>

---------

Signed-off-by: Vishwas Rajashekar <[email protected]>
  • Loading branch information
vrajashkr authored Feb 5, 2024
1 parent e3065f6 commit b332b43
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,33 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true

release-checksums:
name: Release Artifact Checksums
needs: build-arch
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Download Release Artifacts
uses: robinraju/[email protected]
with:
tag: ${{ github.ref_name }}
fileName: "z*"
- name: Generate checksum
uses: jmgilman/actions-generate-checksum@v1
with:
patterns: z*
method: sha256
output: checksums.sha256.txt
- name: Add wildcard character prefix to filenames in checksum file
run: sed -i 's! ! \*!g' checksums.sha256.txt
- name: Publish checksums on releases
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: checksums.sha256.txt
tag: ${{ github.ref }}
overwrite: true

0 comments on commit b332b43

Please sign in to comment.