Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 981 Bytes

File metadata and controls

29 lines (24 loc) · 981 Bytes

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