github.com/ahmet2mir/goreleaser@v0.180.3-0.20210927151101-8e5ee5a9b8c5/www/docs/scm/gitlab.md (about)

     1  # GitLab
     2  
     3  ## API Token
     4  
     5  GoReleaser requires an API token with the `api` scope selected to deploy the artifacts to GitLab.
     6  You can create one [here](https://gitlab.com/profile/personal_access_tokens).
     7  
     8  This token should be added to the environment variables as `GITLAB_TOKEN`.
     9  
    10  Alternatively, you can provide the GitLab token in a file.
    11  GoReleaser will check `~/.config/goreleaser/gitlab_token` by default, but you can change that in the `.goreleaser.yml` file:
    12  
    13  ```yaml
    14  # .goreleaser.yml
    15  env_files:
    16    gitlab_token: ~/.path/to/my/gitlab_token
    17  ```
    18  
    19  ## GitLab Enterprise or private hosted
    20  
    21  You can use GoReleaser with GitLab Enterprise by providing its URLs in the
    22  `.goreleaser.yml` configuration file. This takes a normal string or a template value.
    23  
    24  ```yaml
    25  # .goreleaser.yml
    26  gitlab_urls:
    27    api: https://gitlab.mycompany.com/api/v4/
    28    download: https://gitlab.company.com
    29    # set to true if you use a self-signed certificate
    30    skip_tls_verify: false
    31  ```
    32  
    33  If none are set, they default to GitLab's public URLs.
    34  
    35  !!! note
    36      Releasing to a private-hosted GitLab CE will only work for version `v12.9+`, due to dependencies
    37      on [release](https://docs.gitlab.com/ee/user/project/releases/index.html) functionality
    38      and [direct asset linking](https://docs.gitlab.com/ee/user/project/releases/index.html#permanent-links-to-release-assets).
    39  
    40  
    41  ## Example release
    42  
    43  Here's an example of how the release might look like:
    44  
    45  <a href="https://gitlab.com/goreleaser/example/-/releases">
    46    <figure>
    47      <img src="https://img.carlosbecker.dev/goreleaser-gitlab.png"/>
    48      <figcaption>Example release on GitLab.</figcaption>
    49    </figure>
    50  </a>