github.com/goreleaser/goreleaser@v1.25.1/www/docs/cookbooks/using-jfrog-cli-to-publish-to-artifactory.md (about)

     1  # Publish to Artifactory using jfrog cli
     2  This cookbook is an example of a [publishers](/customization/publishers/) section that uses the [jfrog cli](https://jfrog.com/getcli/) to upload files to Artifactory.  It is an alternative to using the [Artifactory Publisher](/customization/artifactory) to upload to artifactory.
     3  
     4  The benefit of this method is that it uses the jfrog cli configuration instead of environment variables for configuration.
     5  
     6  This assumes you have the [jfrog cli](https://jfrog.com/getcli/) downloaded and in your path, and [configured](https://www.jfrog.com/confluence/display/CLI/JFrog+CLI#JFrogCLI-JFrogPlatformConfiguration) with an API key.
     7  
     8  ```yaml
     9  publishers:
    10  - name: artifactory
    11   cmd: >-
    12     jfrog rt u "{{ .ArtifactName }}" "my-repository/{{ tolower .Env.PROJECT_KEY }}/{{ tolower .ProjectName }}/{{ .Version }}/"
    13   dir: "{{ dir .ArtifactPath }}"
    14  ```
    15  
    16  Example of a [publishers](/customization/publishers/) section pushing files to an Artifactory instance using jfrog cli with api key in environment
    17  
    18  ```yaml
    19  publishers:
    20  - name: artifactory
    21   cmd: >-
    22     jfrog rt u "{{ .ArtifactName }}" "my-repository/{{ tolower .Env.PROJECT_KEY }}/{{ tolower .ProjectName }}/{{ .Version }}/" --api-key "{{ .Env.ARTIFACTORY_API_KEY }}"
    23   dir: "{{ dir .ArtifactPath }}"
    24  ```