From ac900034b57f69930d59194c62de65eb5f260946 Mon Sep 17 00:00:00 2001 From: Rafid Bin Mostofa Date: Thu, 26 Sep 2024 18:38:32 +0600 Subject: [PATCH] chore: publish release checksums (#155) --- .github/workflows/build.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8813f564..d3d7ed64 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,27 +89,34 @@ jobs: CHISEL_VERSION: ${{ steps.build.outputs.CHISEL_VERSION }} run: | ARCHIVE_FILE=chisel_${CHISEL_VERSION}_${GOOS}_${GOARCH}.tar.gz + ARCHIVE_FILE_SHA384="${ARCHIVE_FILE}.sha384" echo "Creating archive $ARCHIVE_FILE" - mkdir -p dist/build - cp chisel LICENSE README.md dist/build - find dist/build -printf "%P\n" | tar -czf dist/$ARCHIVE_FILE --no-recursion -C dist/build -T - + mkdir -p dist/ + cp chisel LICENSE README.md dist/ + find dist -printf "%P\n" | tar -czf $ARCHIVE_FILE --no-recursion -C dist -T - + sha384sum "${ARCHIVE_FILE}" > "${ARCHIVE_FILE_SHA384}" # Share variables with subsequent steps echo "ARCHIVE_FILE=${ARCHIVE_FILE}" >>$GITHUB_OUTPUT + echo "ARCHIVE_FILE_SHA384=${ARCHIVE_FILE_SHA384}" >>$GITHUB_OUTPUT - name: Upload archive as Actions artifact uses: actions/upload-artifact@v3 with: name: ${{ steps.archive.outputs.ARCHIVE_FILE }} - path: dist/${{ steps.archive.outputs.ARCHIVE_FILE }} + path: | + ${{ steps.archive.outputs.ARCHIVE_FILE }} + ${{ steps.archive.outputs.ARCHIVE_FILE_SHA384 }} - name: Upload archive to release env: CHISEL_VERSION: ${{ steps.build.outputs.CHISEL_VERSION }} ARCHIVE_FILE: ${{ steps.archive.outputs.ARCHIVE_FILE }} + ARCHIVE_FILE_SHA384: ${{ steps.archive.outputs.ARCHIVE_FILE_SHA384 }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: ${{ github.event_name == 'release' }} run: | echo "Uploading $ARCHIVE_FILE to release $CHISEL_VERSION" - gh release upload $CHISEL_VERSION dist/$ARCHIVE_FILE + gh release upload $CHISEL_VERSION $ARCHIVE_FILE + gh release upload $CHISEL_VERSION $ARCHIVE_FILE_SHA384