From 53da135c3f9c62f35f044b55de5c29a32e5b540c Mon Sep 17 00:00:00 2001 From: Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> Date: Sat, 11 Jun 2022 11:18:29 +0900 Subject: [PATCH] ci: add checksum for release binary (#1482) --- .github/workflows/release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c93e6ad6..5f9881980 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,6 +82,14 @@ jobs: - name: Strip release binary run: strip "target/${{ matrix.target }}/release/zellij" + + - name: Create checksum + id: make-checksum + working-directory: ./target/${{ matrix.target }}/release + run: | + name="zellij-${{ matrix.target }}.sha256sum" + sha256sum "zellij" > "${name}" + echo "::set-output name=name::${name}" - name: Tar release id: make-artifact @@ -90,6 +98,7 @@ jobs: name="zellij-${{ matrix.target }}.tar.gz" tar cvzf "${name}" "zellij" echo "::set-output name=name::${name}" + - name: Upload release archive uses: actions/upload-release-asset@v1.0.2 env: @@ -100,6 +109,16 @@ jobs: asset_name: zellij-${{matrix.target}}.tar.gz asset_content_type: application/octet-stream + - name: Upload checksum + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ./target/${{ matrix.target }}/release/${{ steps.make-checksum.outputs.name }} + asset_name: zellij-${{matrix.target}}.sha256sum + asset_content_type: text/plain + create-release: runs-on: ubuntu-latest outputs: