From 1d6ad7e761fda152f459f5787bff0e15c5ef6f02 Mon Sep 17 00:00:00 2001 From: quantumsheep Date: Wed, 2 Feb 2022 11:42:56 +0100 Subject: [PATCH] Add checksum on release --- .github/workflows/release.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 977784d..00c6ca9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,18 +30,30 @@ jobs: with: go-version: "~1.17.5" - - run: echo "EXTENSION=.exe" >> $GITHUB_ENV + - name: Set .exe extension for Windows + run: echo "EXTENSION=.exe" >> $GITHUB_ENV if: matrix.target.os == 'windows' - - run: echo "FILENAME=sshs-${{ matrix.target.os }}-${{ matrix.target.arch }}${{ env.EXTENSION }}" >> $GITHUB_ENV + - name: Set executable filename + run: echo "FILENAME=sshs-${{ matrix.target.os }}-${{ matrix.target.arch }}${{ env.EXTENSION }}" >> $GITHUB_ENV - - run: go build -o bin/${{ env.FILENAME }} . + - name: Build + run: go build -o bin/${{ env.FILENAME }} . env: GOOS: "${{ matrix.target.os }}" GOARCH: "${{ matrix.target.arch }}" + - name: Compute checksums + run: shasum --algorithm 256 bin/${{ env.FILENAME }} > bin/${{ env.FILENAME }}.sha256 + - uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: bin/${{ env.FILENAME }} tag: ${{ github.ref }} + + - uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: bin/${{ env.FILENAME }}.sha256 + tag: ${{ github.ref }}