1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-17 01:42:37 +02:00

docs: clarify token files a bit

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos A Becker
2022-12-28 10:19:29 -03:00
parent 04410be510
commit a3867c8ccb
3 changed files with 25 additions and 4 deletions

View File

@ -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.

View File

@ -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

View File

@ -2,13 +2,15 @@
## 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
@ -16,6 +18,9 @@ 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