1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

docs: better env docs

closes #1795

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos A Becker 2021-05-31 01:53:57 +00:00
parent ce7d3b0e89
commit d3bc4fe2c5
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -4,13 +4,14 @@ title: Environment Variables
Global environment variables to be passed down to all hooks and builds.
This is useful for `GO111MODULE`, for example. You can have your
`.goreleaser.yml` file like the following:
This is useful for `GO111MODULE`, for example. You can have your `.goreleaser.yml` file like the following:
```yaml
# .goreleaser.yml
env:
- GO111MODULE=on
- FOO={{ .Env.FOOBAR }}
- ENV_WITH_DEFAULT={{ if index .Env "ENV_WITH_DEFAULT" }}{{ .Env.ENV_WITH_DEFAULT }}{{ else }}default_value{{ end }}
before:
hooks:
- go mod tidy