ci: Compute checksums and publish file containing them as release asset.
@@ -816,6 +816,13 @@ jobs:
for i in *-gadget-*-*-tar-gz/*-gadget-*-*.tar.gz; do
mv $i $(dirname $i)/$(basename $i .tar.gz)-${{ github.ref_name }}.tar.gz
done
+ - name: Compute checksums for all artifacts
+ shell: bash
+ run: |
+ for i in *-gadget-*-*-tar-gz/*-gadget-*-*.tar.gz inspektor-gadget-${{ github.ref_name }}.yaml; do
+ hash=$(sha256sum $i | cut -d' ' -f1)
+ echo "${hash} $(basename $i)" >> inspektor-gadget-${{ github.ref_name }}_checksums.txt
+ done
- name: Upload Gadget Release *.tar.gz
uses: csexton/release-asset-action@v2
with:
@@ -828,6 +835,12 @@ jobs:
file: inspektor-gadget-${{ github.ref_name }}.yaml
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ steps.create_release.outputs.upload_url }}
+ - name: Upload checksums file
+ uses: csexton/release-asset-action@v2
+ with:
+ file: inspektor-gadget-${{ github.ref_name }}_checksums.txt
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ release-url: ${{ steps.create_release.outputs.upload_url }}
- name: Update new version in krew-index
# We only update version in krew-index for effective release.
if: github.repository == 'inspektor-gadget/inspektor-gadget' && !endsWith(github.ref_name, 'rc')
