Skip to content

Commit

Permalink
docs: clarify token files a bit
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Dec 28, 2022
1 parent 04410be commit a3867c8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
13 changes: 13 additions & 0 deletions www/docs/ci/gitlab.md
Expand Up @@ -110,6 +110,19 @@ Add a variable `GITLAB_TOKEN` if you are using [GitLab
releases](https://docs.gitlab.com/ce/user/project/releases/). The value should
be an API token with `api` scope for a user that has access to the project.

Alternatively, you can provide the gitlab token in a file. GoReleaser will check
`~/.config/goreleaser/gitlab_token` by default, but you can change that in the
`.goreleaser.yaml` file:

```yaml
# .goreleaser.yaml
env_files:
gitlab_token: ~/.path/to/my/gitlab_token
```

Note that the environment variable will be used if available, regardless of the
`gitlab_token` file.

The secret variables, `DOCKER_PASSWORD` and `GITLAB_TOKEN`, should be masked.
Optionally, you might want to protect them if the job that uses them will only
be run on protected branches or tags.
Expand Down
3 changes: 3 additions & 0 deletions www/docs/scm/gitea.md
Expand Up @@ -16,6 +16,9 @@ env_files:
gitea_token: ~/.path/to/my/gitea_token
```

Note that the environment variable will be used if available, regardless of the
`gitea_token` file.

## URLs

You can use GoReleaser with Gitea by providing its URLs in
Expand Down
13 changes: 9 additions & 4 deletions www/docs/scm/github.md
Expand Up @@ -2,20 +2,25 @@

## API Token

GoReleaser requires an API token with the `repo` scope selected to deploy the artifacts to GitHub.
You can create one [here](https://github.com/settings/tokens/new).
GoReleaser requires an API token with the `repo` scope selected to deploy the
artifacts to GitHub. You can create one
[here](https://github.com/settings/tokens/new).

This token should be added to the environment variables as `GITHUB_TOKEN`.

Alternatively, you can provide the GitHub token in a file.
GoReleaser will check `~/.config/goreleaser/github_token` by default, but you can change that in the `.goreleaser.yaml` file:
Alternatively, you can provide the GitHub token in a file. GoReleaser will check
`~/.config/goreleaser/github_token` by default, but you can change that in the
`.goreleaser.yaml` file:

```yaml
# .goreleaser.yaml
env_files:
github_token: ~/.path/to/my/github_token
```

Note that the environment variable will be used if available, regardless of the
`github_token` file.

## GitHub Enterprise

You can use GoReleaser with GitHub Enterprise by providing its URLs in the
Expand Down

0 comments on commit a3867c8

Please sign in to comment.