1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-19 20:57:53 +02:00

28 lines
967 B
Markdown
Raw Permalink Normal View History

2021-05-26 19:08:46 -03:00
# Includes
<!-- md:pro -->
2023-09-19 00:31:05 +00:00
GoReleaser allows you to reuse configuration files by including them from either
a URL or a file path.
2021-05-26 19:08:46 -03:00
Files are included recursively in the order they are declared.
```yaml title=".goreleaser.yaml"
2021-05-26 19:08:46 -03:00
includes:
- from_file:
path: ./config/goreleaser.yaml
2021-05-26 19:08:46 -03:00
- from_url:
url: https://raw.githubusercontent.com/goreleaser/goreleaser/main/.goreleaser.yaml
- from_url:
2022-04-20 00:34:24 +02:00
url: caarlos0/goreleaserfiles/main/packages.yml # the https://raw.githubusercontent.com/ prefix may be omitted
2021-05-26 19:08:46 -03:00
- from_url:
url: https://api.mycompany.com/configs/goreleaser.yaml
2021-05-26 19:08:46 -03:00
headers:
# header values are expanded in case they are environment variables
x-api-token: "${MYCOMPANY_TOKEN}"
```
2023-09-19 00:31:05 +00:00
With this and the power of templates, you might be able to reuse the same
`.goreleaser.yaml` configuration file in many projects, or create one file for
each "purpose" and compose them in the final project's `.goreleaser.yaml`.