mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-09 13:36:56 +02:00
docs: how to publish to nexus
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
parent
4fa87989a6
commit
f3c54f0904
18
www/docs/cookbooks/publish-to-nexus.md
Normal file
18
www/docs/cookbooks/publish-to-nexus.md
Normal file
@ -0,0 +1,18 @@
|
||||
# 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 }}"
|
||||
```
|
@ -1,4 +1,4 @@
|
||||
# How to release a library
|
||||
# Release a library
|
||||
|
||||
Maybe you don't want to actually release binaries, but just generate a changelog and whatnot for your Go libraries? GoReleaser got you covered!
|
||||
|
||||
|
@ -11,7 +11,7 @@ executed for each (filtered) artifact. For example, there will be a total of
|
||||
6 executions for 2 publishers with 3 artifacts.
|
||||
|
||||
Publishers run sequentially in the order they're defined
|
||||
and executions are parallelised between all artifacts.
|
||||
and executions are parallelized between all artifacts.
|
||||
In other words the publisher is expected to be safe to run
|
||||
in multiple instances in parallel.
|
||||
|
||||
@ -108,24 +108,3 @@ which may require non-trivial authentication or has otherwise complex requiremen
|
||||
|
||||
!!! tip
|
||||
Learn more about the [name template engine](/customization/templates).
|
||||
|
||||
## Examples
|
||||
|
||||
### Publish to Nexus
|
||||
|
||||
Example of a `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 }}"
|
||||
```
|
||||
|
@ -87,6 +87,7 @@ nav:
|
||||
- About: cookbooks/index.md
|
||||
- cookbooks/semantic-release.md
|
||||
- cookbooks/release-a-library.md
|
||||
- cookbooks/publish-to-nexus.md
|
||||
- tutorials.md
|
||||
- links.md
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user