2021-10-30 09:50:23 -03:00
|
|
|
# Checksums
|
2017-09-10 17:07:28 -03:00
|
|
|
|
2017-10-01 18:57:52 +02:00
|
|
|
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.
|
2017-09-10 17:07:28 -03:00
|
|
|
|
2017-10-01 18:57:52 +02:00
|
|
|
The `checksum` section allows customizations of the filename:
|
2017-09-10 17:07:28 -03:00
|
|
|
|
2020-05-10 18:59:21 -03:00
|
|
|
```yaml
|
2021-12-23 01:52:01 +01:00
|
|
|
# .goreleaser.yaml
|
2017-09-10 17:07:28 -03:00
|
|
|
checksum:
|
|
|
|
# You can change the name of the checksums file.
|
2023-04-02 17:16:21 -03:00
|
|
|
#
|
|
|
|
# Default: {{ .ProjectName }}_{{ .Version }}_checksums.txt
|
|
|
|
# Templates: allowed
|
2017-09-10 17:07:28 -03:00
|
|
|
name_template: "{{ .ProjectName }}_checksums.txt"
|
2019-02-04 17:27:51 -02:00
|
|
|
|
|
|
|
# Algorithm to be used.
|
|
|
|
# Accepted options are sha256, sha512, sha1, crc32, md5, sha224 and sha384.
|
2023-04-02 17:16:21 -03:00
|
|
|
#
|
|
|
|
# Default: sha256.
|
2019-02-04 17:27:51 -02:00
|
|
|
algorithm: sha256
|
2020-08-16 11:58:59 -03:00
|
|
|
|
2020-12-09 12:38:56 +01:00
|
|
|
# IDs of artifacts to include in the checksums file.
|
2023-04-02 17:16:21 -03:00
|
|
|
#
|
2020-12-09 12:38:56 +01:00
|
|
|
# If left empty, all published binaries, archives, linux packages and source archives
|
|
|
|
# are included in the checksums file.
|
2021-09-07 16:16:50 -03:00
|
|
|
ids:
|
2020-12-09 12:38:56 +01:00
|
|
|
- foo
|
|
|
|
- bar
|
|
|
|
|
2020-08-16 11:58:59 -03:00
|
|
|
# Disable the generation/upload of the checksum file.
|
|
|
|
disable: true
|
2021-09-01 22:07:43 -04:00
|
|
|
|
|
|
|
# You can add extra pre-existing files to the checksums file.
|
2021-11-22 14:53:08 -03:00
|
|
|
# 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.
|
|
|
|
#
|
2023-04-02 17:16:21 -03:00
|
|
|
# Templates: allowed
|
2021-09-01 22:07:43 -04:00
|
|
|
extra_files:
|
|
|
|
- glob: ./path/to/file.txt
|
|
|
|
- glob: ./glob/**/to/**/file/**/*
|
|
|
|
- glob: ./glob/foo/to/bar/file/foobar/override_from_previous
|
2021-11-23 22:18:47 -03:00
|
|
|
- glob: ./single_file.txt
|
|
|
|
name_template: file.txt # note that this only works if glob matches 1 file only
|
2023-03-29 22:23:53 -03:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# Since: v1.17 (pro)
|
2023-03-30 13:26:03 -03:00
|
|
|
# This feature is only available in GoReleaser Pro.
|
2023-04-02 17:16:21 -03:00
|
|
|
# Templates: allowed
|
2023-03-29 22:23:53 -03:00
|
|
|
templated_extra_files:
|
|
|
|
- src: LICENSE.tpl
|
|
|
|
dst: LICENSE.txt
|
2017-09-10 17:07:28 -03:00
|
|
|
```
|
2018-07-08 23:57:46 -07:00
|
|
|
|
2020-05-10 18:59:21 -03:00
|
|
|
!!! tip
|
2023-07-06 16:51:23 +00:00
|
|
|
|
2020-11-19 12:31:26 -08:00
|
|
|
Learn more about the [name template engine](/customization/templates/).
|