1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/www/docs/cookbooks/publish-to-nexus.md
Carlos Alexandro Becker f3c54f0904 docs: how to publish to nexus
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-09-23 21:41:05 -03:00

19 lines
668 B
Markdown

# Publish to Nexus
Example of a [publishers](/customization/publishers/) section pushing files to a Nexus instance:
```yaml
publishers:
- name: nexus
cmd: >-
curl -k -u "{{ .Env.NEXUS_USERNAME }}:{{ .Env.NEXUS_PASSWORD }}"
-X POST
-H "Accept: application/json"
-H "Content-Type: multipart/form-data"
"https://nexuspro.somehost.com/service/rest/v1/components?repository=go-raw-autopub"
-F "raw.directory={{ tolower .Env.PROJECT_KEY }}/{{ tolower .ProjectName }}/{{ .Version }}"
-F "raw.asset1=@{{ .ArtifactName }};type=application/gzip"
-F "raw.asset1.filename={{ .ArtifactName }}"
dir: "{{ dir .ArtifactPath }}"
```