2023-03-01 09:42:12 -03:00
|
|
|
# Template Files
|
|
|
|
|
2024-07-17 10:56:36 -03:00
|
|
|
<!-- md:pro -->
|
2023-03-01 09:42:12 -03:00
|
|
|
|
|
|
|
Template Files allow you to create custom files and/or scripts using
|
|
|
|
GoReleaser's internal state and template variables, for example, an installer
|
|
|
|
script.
|
|
|
|
|
|
|
|
All the templated files are uploaded to the release by default.
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# .goreleaser.yaml
|
|
|
|
template_files:
|
2024-03-03 10:53:17 -03:00
|
|
|
- # ID of this particular file.
|
|
|
|
#
|
2024-06-19 11:44:22 -03:00
|
|
|
# Default: 'default'.
|
2024-03-03 10:53:17 -03:00
|
|
|
id: default
|
|
|
|
|
|
|
|
# Source path of the template file.
|
|
|
|
# Ignored if empty.
|
|
|
|
#
|
2024-06-19 11:44:22 -03:00
|
|
|
# Templates: allowed.
|
2024-03-03 10:53:17 -03:00
|
|
|
src: foo.tpl.sh
|
|
|
|
|
|
|
|
# Destination path of the file.
|
2024-04-01 10:01:56 -03:00
|
|
|
# Will be prefixed with the `dist` directory.
|
2024-03-03 10:53:17 -03:00
|
|
|
# Ignored if empty.
|
|
|
|
#
|
2024-06-19 11:44:22 -03:00
|
|
|
# Templates: allowed.
|
2024-03-03 10:53:17 -03:00
|
|
|
dst: foo.sh
|
|
|
|
|
|
|
|
# File mode.
|
|
|
|
#
|
|
|
|
# Default: 0655.
|
|
|
|
mode: 0755
|
2023-03-01 09:42:12 -03:00
|
|
|
```
|
|
|
|
|
2024-07-17 10:56:36 -03:00
|
|
|
<!-- md:templates -->
|