1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-01 13:07:49 +02:00

docs: include simple multiple binary example (#1596)

This commit is contained in:
Weslei Juan Moser Pereira 2020-06-09 10:04:46 -03:00 committed by GitHub
parent d96ea66cc2
commit 6fc7cb769a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,6 +118,36 @@ builds:
!!! tip
Learn more about the [name template engine](/customization/templates).
Here is an example with multiple binaries:
```yaml
# goreleaser.yml
builds:
- main: ./cmd/cli/cli.go
id: "cli"
binary: cli
goos:
- linux
- darwin
- windows
- main: ./cmd/worker/worker.go
id: "worker"
binary: worker
goos:
- linux
- darwin
- windows
- main: ./cmd/tracker/tracker.go
id: "tracker"
binary: tracker
goos:
- linux
- darwin
- windows
```
## Passing environment variables to ldflags
You can do that by using `{{ .Env.VARIABLE_NAME }}` in the template, for