mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-28 04:44:34 +02:00
5d98c69f0f
If applied, these commits will allow users to use BLAKE2 (BLAKE2b-512 and BLAKE2s-256) and SHA-3 (SHA3-{224,256,384,512}) as checksum algorithms. This is because I think it would be useful if these algorithms could be used as an alternative to SHA-1 and SHA-2. These algorithms are standardized as [RFC 7693](https://datatracker.ietf.org/doc/html/rfc7693) (BLAKE2) and [FIPS PUB 202](https://www.nist.gov/publications/sha-3-standard-permutation-based-hash-and-extendable-output-functions) (SHA-3). - <https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2> - <https://en.wikipedia.org/wiki/SHA-3>
2.1 KiB
2.1 KiB
Checksums
GoReleaser generates a project_1.0.0_checksums.txt
file and uploads it with the
release, so your users can validate if the downloaded files are correct.
The checksum
section allows customizations of the filename:
# .goreleaser.yaml
checksum:
# You can change the name of the checksums file.
#
# Default: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
# or, when split is set: '{{ .ArtifactName }}.{{ .Algorithm }}'
# Templates: allowed
name_template: "{{ .ProjectName }}_checksums.txt"
# Algorithm to be used.
#
# Accepted options are:
# - sha256
# - sha512
# - sha1
# - crc32
# - md5
# - sha224
# - sha384
# - sha3-256
# - sha3-512
# - sha3-224
# - sha3-384
# - blake2s
# - blake2b
#
# Default: sha256.
algorithm: sha256
# If true, will create one checksum file for each artifact.
# Since: v1.25
split: true
# IDs of artifacts to include in the checksums file.
#
# If left empty, all published binaries, archives, linux packages and source archives
# are included in the checksums file.
ids:
- foo
- bar
# Disable the generation/upload of the checksum file.
disable: true
# You can add extra pre-existing files to the checksums file.
# The filename on the checksum will be the last part of the path (base).
# If another file with the same name exists, the last one found will be used.
#
# Templates: allowed
extra_files:
- glob: ./path/to/file.txt
- glob: ./glob/**/to/**/file/**/*
- glob: ./glob/foo/to/bar/file/foobar/override_from_previous
- glob: ./single_file.txt
name_template: file.txt # note that this only works if glob matches 1 file only
# Additional templated extra files to add to the checksum.
# Those files will have their contents pass through the template engine,
# and its results will be added to the checksum.
#
# This feature is only available in GoReleaser Pro.
# Since: v1.17 (pro)
# Templates: allowed
templated_extra_files:
- src: LICENSE.tpl
dst: LICENSE.txt
!!! tip
Learn more about the [name template engine](/customization/templates/).