--- title: Artifactory --- Since [v0.38.0](https://github.com/goreleaser/goreleaser/releases/tag/v0.38.0), GoReleaser supports building and pushing artifacts into Artifactory. ## How it works You can declare multiple Artifactory instances. All binaries generated by your `builds` section will be pushed to each configured Artifactory. If you have only one Artifactory instance, the configuration is as easy as adding the upload target and a usernameto your `.goreleaser.yml` file: ```yaml artifactories: - target: http://:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }} username: goreleaser ``` Prerequisites: - A running Artifactory instances - A user + password / API key with grants to upload an artifact ### Target The `target` is the final URL of _without_ the binary name. A configuration for `goreleaser` with the target ``` http://artifacts.company.com:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }} ``` will result in a final deployment like ``` http://artifacts.company.com:8081/artifactory/example-repo-local/goreleaser/Darwin/x86_64/goreleaser ``` Support variables: - Os - Arch - Arm - Version - Tag - ProjectName ### Password / API Key Your configured username needs to be authenticated against your Artifactory. The password or API key will be stored in a environment variable. If you have only one Artifactory configured, you will store the secret in `ARTIFACTORY_0_SECRET`. If you have multiple instances configured, you store the password for the second instance in `ARTIFACTORY_1_SECRET`, for the third in `ARTIFACTORY_2_SECRET` and so on. ## Customization Of course, you can customize a lot of things: ```yaml # .goreleaser.yml artifactories: # You can have multiple Artifactory instances. - # URL of your Artifactory instance + path to deploy to target: http://artifacts.company.com:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }} # User that will be used for the deployment ``` These settings should allow you to push your artifacts into multiple Artifactories.