Skip to content
hash

GitHub Action

Generate Release Hashes

v4 Latest version

Generate Release Hashes

hash

Generate Release Hashes

A GitHub action to automatically generate a list of hashes for a release

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Generate Release Hashes

uses: MCJack123/ghaction-Generate-Release-Hashes@v4

Learn more about this action in MCJack123/ghaction-Generate-Release-Hashes

Choose a version

Generate Release Hashes - GitHub Action

A GitHub action to automatically generate a list of hashes for a release.

Inputs

hash-type

The type of hash to generate for each file. Must be one of md5, sha1, sha256, or sha512. Defaults to sha256.

file-name

A file name to output to, if desired. If this is named the same as a file in the release, that file is not included in the hash list.

get-assets

If set to "true", the list of assets will be redownloaded instead of using the GitHub-provided list. This is useful if previous jobs in a workflow upload assets, as GitHub's list will not include them.

Outputs

hashes

A string with the list of files/hashes generated by the action.

Example usage

Upload the list as an artifact:

- uses: MCJack123/ghaction-generate-release-hashes@v3
  with:
    hash-type: sha1
    file-name: hashes.txt
- uses: actions/upload-artifact@v2
  with:
    name: Asset Hashes
    path: hashes.txt