Skip to content

Commit

Permalink
Generate and upload sha256 checksums for archives (#33)
Browse files Browse the repository at this point in the history
Automate generating and releasing checksums for archives
  • Loading branch information
afnanenayet authored Jan 20, 2021
1 parent 955a93b commit 965ca20
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/publish_optimized_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ jobs:
cp target/release/${{ matrix.artifact_name }} ${{ matrix.asset_name }}
tar -czvf ${{ matrix.asset_name }}${{ matrix.archive_ext }} ${{ matrix.asset_name }}
- name: Generate SHA256 checksum for binary
if: matrix.os != 'windows-latest'
id: checksum_archive_unix_like
shell: bash
run: |
sha256sum ${{ matrix.asset_name }}${{ matrix.archive_ext }} > ${{ matrix.asset_name }}${{ matrix.archive_ext }}.sha256sum
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
Expand All @@ -69,3 +76,13 @@ jobs:
asset_name: ${{ matrix.asset_name }}${{ matrix.archive_ext }}
tag: ${{ github.ref }}
overwrite: true

- name: Upload SHA256 checksum to release
if: matrix.os != 'windows-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.asset_name }}${{ matrix.archive_ext }}.sha256sum
asset_name: ${{ matrix.asset_name }}${{ matrix.archive_ext }}.sha256sum
tag: ${{ github.ref }}
overwrite: true

0 comments on commit 965ca20

Please sign in to comment.