From 7709529f1a58d24233e0a8ebc66828b19ec7dd5d Mon Sep 17 00:00:00 2001 From: Daniel <71837281+darmiel@users.noreply.github.com> Date: Mon, 18 Oct 2021 12:35:35 +0200 Subject: [PATCH] feat: include sha256sum for release files --- .github/workflows/tag.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index d8b5c42..bcea083 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -107,9 +107,10 @@ jobs: - name: Download go dependencies run: go get -t -v ./... + # Release File - name: Create release run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags "-s -w" -o pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} ./ - + - name: Upload release assets id: upload-release-asset uses: actions/upload-release-asset@v1 @@ -120,3 +121,18 @@ jobs: asset_path: ./pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} asset_name: pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} asset_content_type: application/octet-stream + + # SHA256 Sum File + - name: Create SHA256 sum + run: sha256sum pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} > pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}.sha256.txt + + - name: Upload release assets + id: upload-release-sum-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.release.outputs.upload_url }}${{ matrix.extension }}.sha256.txt + asset_path: ./pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}.sha256.txt + asset_name: pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}.sha256.txt + asset_content_type: application/octet-stream