github.com/goreleaser/goreleaser@v1.25.1/www/docs/customization/source.md (about) 1 # Source Archive 2 3 You may add the current tag source archive to the release as well. This is 4 particularly useful if you want to sign it, for example. 5 6 ```yaml 7 # .goreleaser.yaml 8 source: 9 # Whether this pipe is enabled or not. 10 enabled: true 11 12 # Name template of the final archive. 13 # 14 # Default: '{{ .ProjectName }}-{{ .Version }}' 15 # Templates: allowed 16 name_template: "{{ .ProjectName }}" 17 18 # Format of the archive. 19 # 20 # Valid formats are: tar, tgz, tar.gz, and zip. 21 # 22 # Default: 'tar.gz' 23 format: "tar" 24 25 # Prefix. 26 # String to prepend to each filename in the archive. 27 # 28 # Templates: allowed 29 prefix_template: "{{ .ProjectName }}-{{ .Version }}/" 30 31 # This will make the destination paths be relative to the longest common 32 # path prefix between all the files matched and the source glob. 33 # Enabling this essentially mimic the behavior of nfpm's contents section. 34 # It will be the default by June 2023. 35 # 36 # Since: v1.14 37 rlcp: true 38 39 # Additional files/globs you want to add to the source archive. 40 # 41 # Since: v1.11 42 # Templates: allowed 43 files: 44 - LICENSE.txt 45 - README_{{.Os}}.md 46 - CHANGELOG.md 47 - docs/* 48 - design/*.png 49 - templates/**/* 50 # a more complete example, check the globbing deep dive below 51 - src: "*.md" 52 dst: docs 53 54 # Strip parent directories when adding files to the archive. 55 strip_parent: true 56 57 # File info. 58 # Not all fields are supported by all formats available formats. 59 # Default: file info of the source file 60 info: 61 owner: root 62 group: root 63 mode: 0644 64 # format is `time.RFC3339Nano` 65 mtime: 2008-01-02T15:04:05Z 66 67 # Additional templated files to add to the source archive. 68 # Those files will have their contents pass through the template engine, 69 # and its results will be added to the source archive. 70 # 71 # This feature is only available in GoReleaser Pro. 72 # Since: v1.17 (pro) 73 # Templates: allowed 74 templated_files: 75 # a more complete example, check the globbing deep dive below 76 - src: "LICENSE.md.tpl" 77 dst: LICENSE.md 78 info: 79 owner: root 80 group: root 81 mode: 0644 82 mtime: 2008-01-02T15:04:05Z 83 ``` 84 85 !!! tip 86 87 Learn more about the [name template engine](/customization/templates/).