Command (`cmd`), workdir (`dir`) and environment variables (`env`) support templating
```yaml
publishers:
- name: production
cmd: |
custom-publisher \
-product={{ .ProjectName }} \
-version={{ .Version }} \
{{ .ArtifactName }}
dir: "{{ dir .ArtifactPath }}"
env:
- TOKEN={{ .Env.CUSTOM_PUBLISHER_TOKEN }}
```
so the above example will execute `custom-publisher -product=goreleaser -version=1.0.0 goreleaser_1.0.0_linux_amd64.zip` in `/path/to/dist` with `TOKEN=token`, assuming that GoReleaser is executed with `CUSTOM_PUBLISHER_TOKEN=token`.
Supported variables:
-`Version`
-`Tag`
-`ProjectName`
-`ArtifactName`
-`ArtifactPath`
-`Os`
-`Arch`
-`Arm`
## Customization
Of course, you can customize a lot of things:
```yaml
# .goreleaser.yml
publishers:
-
# Unique name of your publisher. Used for identification
name: "custom"
# IDs of the artifacts you want to publish
ids:
- foo
- bar
# Publish checksums (defaults to false)
checksum: true
# Publish signatures (defaults to false)
signature: true
# Working directory in which to execute the command