Created
October 25, 2022 19:36
-
-
Save fxstein/1e34eb0417f46d6aacbc22a51ece6da8 to your computer and use it in GitHub Desktop.
Github Action to calculate sha256 for release tarball
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/fxstein/GoProX | |
# .github/workflows/release.yml - Automatic creation of sha256 for release tarball | |
name: goprox release action | |
run-name: ${{ github.actor }} is publishing release ${{ github.ref_name }} | |
on: | |
release: | |
types: [published] | |
jobs: | |
sha256: | |
name: sha256 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Tarball url | |
run: echo "${{ github.server_url }}/${{ github.repository }}/archive/refs/tags/${{ github.ref_name }}.tar.gz" | |
- name: Tarball sha256 | |
run: curl -sL "${{ github.server_url }}/${{ github.repository }}/archive/refs/tags/${{ github.ref_name }}.tar.gz" | shasum -a 256 | cut -d " " -f 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment