ci: add checksum for release binary (#1482)

This commit is contained in:
Jae-Heon Ji 2022-06-11 11:18:29 +09:00 committed by GitHub
parent 13c3b052f3
commit 53da135c3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: