Skip to content

Instantly share code, notes, and snippets.

@fxstein
Created October 25, 2022 19:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fxstein/1e34eb0417f46d6aacbc22a51ece6da8 to your computer and use it in GitHub Desktop.
Save fxstein/1e34eb0417f46d6aacbc22a51ece6da8 to your computer and use it in GitHub Desktop.
Github Action to calculate sha256 for release tarball
# 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