Skip to content

Commit

Permalink
docs: rename in the docs goreleaser.yml to goreleaser.yaml (#2784)
Browse files Browse the repository at this point in the history
  • Loading branch information
Engin Diri committed Dec 23, 2021
1 parent 30e536e commit a19ee5f
Show file tree
Hide file tree
Showing 58 changed files with 132 additions and 132 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Expand Up @@ -62,7 +62,7 @@ GoReleaser is built for CI tools, you only need to download and execute it
in your build script. Of course, you can also install it locally if you wish.
You can also customize your entire release process through a
single .goreleaser.yml file.
single .goreleaser.yaml file.
`,
Version: version,
SilenceUsage: true,
Expand Down
2 changes: 1 addition & 1 deletion cmd/testdata/good.yml
@@ -1,4 +1,4 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# This is an example .goreleaser.yaml file with some sensible defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
Expand Down
2 changes: 1 addition & 1 deletion www/docs/ci/cloudbuild.md
Expand Up @@ -6,7 +6,7 @@ your changes are pulled to a repo like
and that's what you're building off.

This repo has the wrong name, so to prevent GoReleaser from publishing to
the wrong GitHub repo, add to your `.goreleaser.yml` file's release section:
the wrong GitHub repo, add to your `.goreleaser.yaml` file's release section:

```yaml
release:
Expand Down
22 changes: 11 additions & 11 deletions www/docs/ci/gitlab.md
@@ -1,18 +1,18 @@
# GitLab CI

Below are some example GitLab CI jobs that use GoReleaser to release a project.
Below are some example GitLab CI jobs that use GoReleaser to release a project.

> If you are using private hosted or Enterprise version of Gitlab, please follow this [guide](/scm/gitlab/) before diving into the details.
## Basic Releasing

You can easily run GoReleaser in GitLab CI using its Docker container.
You can easily run GoReleaser in GitLab CI using its Docker container.

In the repository's GitLab CI settings, add a `GITLAB_TOKEN` variable. The value should
be an API token with `api` scope for a user that has access to the project. This
variable should be masked and optionally protected if the job will only run on
protected branches and tags.
See [Quick Start](https://goreleaser.com/quick-start/) for more information on
See [Quick Start](https://goreleaser.com/quick-start/) for more information on
GoReleaser's environment variables.

Add a `.gitlab-ci.yml` file to the root of the project:
Expand All @@ -36,18 +36,18 @@ release:
- goreleaser release --rm-dist
```

Notice that `entrypoint` is intentionally blank. See the
[GitLab documentation on entrypoints](https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#overriding-the-entrypoint-of-an-image)
Notice that `entrypoint` is intentionally blank. See the
[GitLab documentation on entrypoints](https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#overriding-the-entrypoint-of-an-image)
for more information.

When tags are pushed to the repository,
an available GitLab Runner with the Docker executor will pick up the release job.
`goreleaser/goreleaser` will start in a container and the repository will be mounted inside.
Finally, the `script` section will run within the container starting in your project's directory.
When tags are pushed to the repository,
an available GitLab Runner with the Docker executor will pick up the release job.
`goreleaser/goreleaser` will start in a container and the repository will be mounted inside.
Finally, the `script` section will run within the container starting in your project's directory.

## Releasing Archives and Pushing Images

Pushing images to a registry requires using Docker-in-Docker. To create GitLab releases and push
Pushing images to a registry requires using Docker-in-Docker. To create GitLab releases and push
images to a Docker registry, add a file `.gitlab-ci.yml` to the root of the project:

```yaml
Expand Down Expand Up @@ -102,7 +102,7 @@ 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.

Make sure the `image_templates` in the file `.goreleaser.yml` reflect that
Make sure the `image_templates` in the file `.goreleaser.yaml` reflect that
custom registry!

Example:
Expand Down
4 changes: 2 additions & 2 deletions www/docs/ci/semaphore.md
Expand Up @@ -33,14 +33,14 @@ blocks:
# which may be automatic or manual and optionally depend on conditions.
promotions:
- name: Release
pipeline_file: goreleaser.yml
pipeline_file: goreleaser.yaml
auto_promote_on:
- result: passed
branch:
- "^refs/tags/v*"
```

Pipeline file in `.semaphore/goreleaser.yml`:
Pipeline file in `.semaphore/goreleaser.yaml`:

```yaml
version: "v1.0"
Expand Down
2 changes: 1 addition & 1 deletion www/docs/cmd/goreleaser.md
Expand Up @@ -12,7 +12,7 @@ GoReleaser is built for CI tools, you only need to download and execute it
in your build script. Of course, you can also install it locally if you wish.

You can also customize your entire release process through a
single .goreleaser.yml file.
single .goreleaser.yaml file.


## Options
Expand Down
2 changes: 1 addition & 1 deletion www/docs/cookbooks/build-go-modules.md
Expand Up @@ -8,7 +8,7 @@ need to setup GoReleaser to "proxy" that module before building it.
To do that, you can simply add this to your config:

```yaml
# goreleaser.yml
# goreleaser.yaml
gomod:
proxy: true
```
Expand Down
2 changes: 1 addition & 1 deletion www/docs/cookbooks/debconf-templates.md
Expand Up @@ -41,7 +41,7 @@ if [ "$RET" = "false" ]; then
fi
```

Include `templates` and `postinst` in `.goreleaser.yml`:
Include `templates` and `postinst` in `.goreleaser.yaml`:

```yaml
overrides:
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/discord.md
Expand Up @@ -7,10 +7,10 @@ environment variables on your pipeline:
- `DISCORD_WEBHOOK_ID`
- `DISCORD_WEBHOOK_TOKEN`

After this, you can add following section to your `.goreleaser.yml` config:
After this, you can add following section to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
discord:
# Whether its enabled or not.
Expand Down
2 changes: 1 addition & 1 deletion www/docs/customization/announce/index.md
Expand Up @@ -5,7 +5,7 @@ GoReleaser can also announce new releases on social networks, chat rooms and via
It runs at the very end of the pipeline and can be skipped with the `--skip-announce` flag of the [`release`](/cmd/goreleaser_release/) command, or via the skip property:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
# Skip the announcing feature in some conditions, for instance, when publishing patch releases.
# Valid options are `true`, `false`, empty, or a template that evaluates to a boolean (`true` or `false`).
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/linkedin.md
Expand Up @@ -7,10 +7,10 @@ For it to work, you'll need to set some environment variables on your pipeline:
!!! warning
We currently don't support posting in groups.

Then, you can add something like the following to your `.goreleaser.yml` config:
Then, you can add something like the following to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
linkedin:
# Whether its enabled or not.
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/mattermost.md
Expand Up @@ -5,10 +5,10 @@ environment variables on your pipeline:

- `MATTERMOST_WEBHOOK`

Then, you can add something like the following to your `.goreleaser.yml` config:
Then, you can add something like the following to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
mattermost:
# Whether its enabled or not.
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/reddit.md
Expand Up @@ -6,10 +6,10 @@ variables on your pipeline:
- `REDDIT_SECRET`
- `REDDIT_PASSWORD`

Then, you can add something like the following to your `.goreleaser.yml` config:
Then, you can add something like the following to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
reddit:
# Whether its enabled or not.
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/slack.md
Expand Up @@ -5,10 +5,10 @@ environment variables on your pipeline:

- `SLACK_WEBHOOK`

Then, you can add something like the following to your `.goreleaser.yml` config:
Then, you can add something like the following to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
slack:
# Whether its enabled or not.
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/smtp.md
Expand Up @@ -4,10 +4,10 @@ For it to work, you'll need to set some environment variables on your pipeline:

- `SMTP_PASSWORD`

Then, you can add something like the following to your `.goreleaser.yml` config:
Then, you can add something like the following to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
smtp:
# Whether its enabled or not.
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/teams.md
Expand Up @@ -6,10 +6,10 @@ to [create a Webhook](https://docs.microsoft.com/en-us/microsoftteams/platform/w

- `TEAMS_WEBHOOK`

After this, you can add following section to your `.goreleaser.yml` config:
After this, you can add following section to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
teams:
# Whether its enabled or not.
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/telegram.md
Expand Up @@ -7,10 +7,10 @@ some environment variables on your pipeline:

Also you need to know your channel's chat ID to talk with.

Then, you can add something like the following to your `.goreleaser.yml` config:
Then, you can add something like the following to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
telegram:
# Whether its enabled or not.
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/announce/twitter.md
Expand Up @@ -8,10 +8,10 @@ some environment variables on your pipeline:
- `TWITTER_ACCESS_TOKEN`
- `TWITTER_ACCESS_TOKEN_SECRET`

Then, you can add something like the following to your `.goreleaser.yml` config:
Then, you can add something like the following to your `.goreleaser.yaml` config:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
announce:
twitter:
# Whether its enabled or not.
Expand Down
8 changes: 4 additions & 4 deletions www/docs/customization/archive.md
Expand Up @@ -7,7 +7,7 @@ additional files, and format.
Here is a commented `archives` section with all fields specified:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
archives:
-
# ID of this archive.
Expand Down Expand Up @@ -148,7 +148,7 @@ on the archive section.
A working hack is to use something like this:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
archives:
- files:
- none*
Expand All @@ -169,7 +169,7 @@ Presumably, you'll want that file to be the binary, so, your archive section
will probably look like this:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
archives:
- format: gz
files:
Expand All @@ -188,7 +188,7 @@ extracted with something like `gzip -d file.gz`.
You can do that by setting `format` to `binary`:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
archives:
- format: binary
```
Expand Down
4 changes: 2 additions & 2 deletions www/docs/customization/artifactory.md
Expand Up @@ -10,7 +10,7 @@ each configured Artifactory.

If you have only one Artifactory instance,
the configuration is as easy as adding the
upload target and a username to your `.goreleaser.yml` file:
upload target and a username to your `.goreleaser.yaml` file:

```yaml
artifactories:
Expand Down Expand Up @@ -115,7 +115,7 @@ puts:
Of course, you can customize a lot of things:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
artifactories:
# You can have multiple Artifactory instances.
-
Expand Down
2 changes: 1 addition & 1 deletion www/docs/customization/blob.md
Expand Up @@ -6,7 +6,7 @@ Google GCS.
## Customization

```yaml
# .goreleaser.yml
# .goreleaser.yaml
blobs:
# You can have multiple blob configs
-
Expand Down
20 changes: 10 additions & 10 deletions www/docs/customization/build.md
Expand Up @@ -8,7 +8,7 @@ the name of the binary, flags, environment variables, hooks and etc.
Here is a commented `builds` section with all fields specified:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
builds:
# You can have multiple builds defined as a yaml list
-
Expand Down Expand Up @@ -163,7 +163,7 @@ builds:
Here is an example with multiple binaries:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
builds:
- main: ./cmd/cli
id: "cli"
Expand Down Expand Up @@ -206,7 +206,7 @@ You can do that by using `{{ .Env.VARIABLE_NAME }}` in the template, for
example:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
builds:
- ldflags:
- -s -w -X "main.goversion={{.Env.GOVERSION}}"
Expand All @@ -228,7 +228,7 @@ In addition to simple declarations as shown above _multiple_ hooks can be declar
to help retaining reusability of config between different build environments.

```yaml
# .goreleaser.yml
# .goreleaser.yaml
builds:
-
id: "with-hooks"
Expand All @@ -247,7 +247,7 @@ builds:
Each hook can also have its own work directory and environment variables:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
builds:
-
id: "with-hooks"
Expand Down Expand Up @@ -287,10 +287,10 @@ Environment variables are inherited and overridden in the following order:
very likely to fail.

You can solve this by running `go mod tidy` before calling `goreleaser` or
by adding a [hook][] doing that on your `.goreleaser.yml` file:
by adding a [hook][] doing that on your `.goreleaser.yaml` file:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
before:
hooks:
- go mod tidy
Expand Down Expand Up @@ -330,7 +330,7 @@ Reasons you might want to do that include:
In any case, its pretty easy to do that now:

```yaml
# .goreleaser.yml
# .goreleaser.yaml
builds:
-
# Set the builder to prebuilt
Expand Down Expand Up @@ -366,9 +366,9 @@ There is no difference in how the binaries are handled.

!!! tip
A cool tip here, specially when using CGO, is that you can have one
`.goreleaser.yml` file just for the builds, build each in its own machine
`.goreleaser.yaml` file just for the builds, build each in its own machine
with [`goreleaser build --single-target`](/cmd/goreleaser_build/) and
have a second `.goreleaser.yml` file that imports those binaries
have a second `.goreleaser.yaml` file that imports those binaries
and release them.
This tip can also be used to speed up the build process if you run all the
builds in different machines in parallel.
Expand Down

0 comments on commit a19ee5f

Please sign in to comment.