2021-10-30 09:50:23 -03:00
|
|
|
# Source Archive
|
2020-04-12 11:47:46 -03:00
|
|
|
|
2022-09-17 00:13:09 -03:00
|
|
|
You may add the current tag source archive to the release as well. This is
|
|
|
|
particularly useful if you want to sign it, for example.
|
2020-04-12 11:47:46 -03:00
|
|
|
|
2020-05-10 18:59:21 -03:00
|
|
|
```yaml
|
2021-12-23 01:52:01 +01:00
|
|
|
# .goreleaser.yaml
|
2020-04-12 11:47:46 -03:00
|
|
|
source:
|
|
|
|
# Whether this pipe is enabled or not.
|
|
|
|
# Defaults to `false`
|
|
|
|
enabled: true
|
|
|
|
|
|
|
|
# Name template of the final archive.
|
|
|
|
# Defaults to `{{ .ProjectName }}-{{ .Version }}`
|
|
|
|
name_template: '{{ .ProjectName }}'
|
|
|
|
|
|
|
|
# Format of the archive.
|
|
|
|
# Any format git-archive supports, this supports too.
|
|
|
|
# Defaults to `tar.gz`
|
|
|
|
format: 'tar'
|
2021-11-02 23:57:20 +01:00
|
|
|
|
|
|
|
# Prefix template.
|
|
|
|
# String to prepend to each filename in the archive.
|
|
|
|
# Defaults to empty
|
|
|
|
prefix_template: '{{ .ProjectName }}-{{ .Version }}/'
|
2022-08-25 01:10:26 -03:00
|
|
|
|
|
|
|
# Additional files/template/globs you want to add to the source archive.
|
2022-09-11 16:54:51 -03:00
|
|
|
#
|
|
|
|
# Default: empty.
|
|
|
|
# Since: v1.11.
|
2022-08-25 01:10:26 -03:00
|
|
|
files:
|
|
|
|
- LICENSE.txt
|
|
|
|
- README_{{.Os}}.md
|
|
|
|
- CHANGELOG.md
|
|
|
|
- docs/*
|
|
|
|
- design/*.png
|
|
|
|
- templates/**/*
|
2022-08-25 02:15:37 -03:00
|
|
|
# a more complete example, check the globbing deep dive below
|
|
|
|
- src: '*.md'
|
|
|
|
dst: docs
|
|
|
|
# Strip parent folders when adding files to the archive.
|
|
|
|
# Default: false
|
|
|
|
strip_parent: true
|
|
|
|
# File info.
|
|
|
|
# Not all fields are supported by all formats available formats.
|
|
|
|
# Defaults to the file info of the actual file if not provided.
|
|
|
|
info:
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
# format is `time.RFC3339Nano`
|
|
|
|
mtime: 2008-01-02T15:04:05Z
|
|
|
|
|
2020-04-12 11:47:46 -03:00
|
|
|
```
|
|
|
|
|
2020-05-10 18:59:21 -03:00
|
|
|
!!! tip
|
2020-11-19 12:31:26 -08:00
|
|
|
Learn more about the [name template engine](/customization/templates/).
|