mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-14 03:51:24 +02:00
docs: minor docs improvements (#5320)
- better styling - short codes - no 404 on unreleased `Since: ` block
This commit is contained in:
parent
f1a364726d
commit
a23c9df16b
@ -37,8 +37,7 @@ It even works cross-repository!
|
||||
|
||||
Here's an example:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
brews: # can be brews, krew, scoops, etc...
|
||||
- # ...
|
||||
repository:
|
||||
@ -72,8 +71,7 @@ install from there.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
nix:
|
||||
- name: goreleaser-pro
|
||||
repository:
|
||||
@ -99,8 +97,7 @@ generate the needed manifests, and you can then PR them to
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
winget:
|
||||
- name: goreleaser-pro
|
||||
publisher: goreleaser
|
||||
@ -206,8 +203,7 @@ include **only** the commits that match one of them.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
changelog:
|
||||
filters:
|
||||
include:
|
||||
|
@ -16,8 +16,7 @@ New release coming in hot!
|
||||
- **new**: create macOS app bundles. Initially they are only usable with `dmgs`,
|
||||
more uses might be added in the future. (only on [pro][])
|
||||
Example:
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
app_bundles:
|
||||
- bundle: com.goreleaser.goreleaser
|
||||
icon: www/docs/static/goreleaser.icns
|
||||
|
@ -107,8 +107,7 @@ jobs:
|
||||
And reference the fingerprint in your signing configuration using the
|
||||
`GPG_FINGERPRINT` environment variable:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
signs:
|
||||
- artifacts: checksum
|
||||
cmd: gpg2
|
||||
|
@ -120,8 +120,7 @@ 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
|
||||
```yaml title=".goreleaser.yaml"
|
||||
env_files:
|
||||
gitlab_token: ~/.path/to/my/gitlab_token
|
||||
```
|
||||
|
@ -17,8 +17,7 @@ First, you need to define one `dockers` item for each platform you want to
|
||||
build. Usually, you would tag it like `myorg/myimage:version-platform`.
|
||||
It is also important to use `buildx`. Here's an example:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
dockers:
|
||||
- image_templates:
|
||||
- "myorg/myuser:{{ .Tag }}-amd64"
|
||||
@ -42,8 +41,7 @@ Now, if we want to make them both available as a single image
|
||||
(`myorg/myuser:v1.2.3`), we'll need to add a manifest configuration that will
|
||||
publish them behind that single name. Here's how it would look like:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
docker_manifests:
|
||||
- name_template: "myorg/myuser:{{ .Tag }}"
|
||||
image_templates:
|
||||
|
@ -8,8 +8,7 @@ following environment variable on your pipeline:
|
||||
After this, you can add following section to your `.goreleaser.yaml`
|
||||
configuration:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
bluesky:
|
||||
# Whether it's enabled or not.
|
||||
|
@ -9,8 +9,7 @@ environment variables on your pipeline:
|
||||
|
||||
After this, you can add following section to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
discord:
|
||||
# Whether its enabled or not.
|
||||
|
@ -7,8 +7,7 @@ It runs at the very end of the pipeline and can be skipped with the
|
||||
`--skip=announce` flag of the [`release`](../../cmd/goreleaser_release.md)
|
||||
command, or via the skip property:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
# Skip the announcing feature in some conditions, for instance, when
|
||||
# publishing patch releases.
|
||||
|
@ -10,8 +10,7 @@ For it to work, you'll need to set some environment variables on your pipeline:
|
||||
|
||||
Then, you can add something like the following to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
linkedin:
|
||||
# Whether its enabled or not.
|
||||
|
@ -11,8 +11,7 @@ permissions, and set the following environment variables in your pipeline:
|
||||
Then, you can add something like the following to your `.goreleaser.yaml`
|
||||
configuration file:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
mastodon:
|
||||
# Whether its enabled or not.
|
||||
|
@ -7,8 +7,7 @@ environment variables on your pipeline:
|
||||
|
||||
Then, you can add something like the following to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
mattermost:
|
||||
# Whether its enabled or not.
|
||||
|
@ -6,8 +6,7 @@ For it to work, you'll need to create a personal token (`https://opencollective.
|
||||
|
||||
Then, you can add something like the following to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
opencollective:
|
||||
# Whether its enabled or not.
|
||||
|
@ -8,8 +8,7 @@ variables on your pipeline:
|
||||
|
||||
Then, you can add something like the following to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
reddit:
|
||||
# Whether its enabled or not.
|
||||
|
@ -7,8 +7,7 @@ environment variables on your pipeline:
|
||||
|
||||
Then, you can add something like the following to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
slack:
|
||||
# Whether its enabled or not.
|
||||
|
@ -6,8 +6,7 @@ For it to work, you'll need to set some environment variables on your pipeline:
|
||||
|
||||
Then, you can add something like the following to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
smtp:
|
||||
# Whether its enabled or not.
|
||||
|
@ -8,8 +8,7 @@ to [create a Webhook](https://docs.microsoft.com/en-us/microsoftteams/platform/w
|
||||
|
||||
After this, you can add following section to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
teams:
|
||||
# Whether its enabled or not.
|
||||
|
@ -11,8 +11,7 @@ Also you need to know your channel's chat ID to talk with.
|
||||
Then, you can add something like the following to your `.goreleaser.yaml`
|
||||
config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
telegram:
|
||||
# Whether its enabled or not.
|
||||
|
@ -16,8 +16,7 @@ some environment variables on your pipeline:
|
||||
|
||||
Then, you can add something like the following to your `.goreleaser.yaml` config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
twitter:
|
||||
# Whether its enabled or not.
|
||||
|
@ -11,8 +11,7 @@ If your endpoints are not secure, you can use following environment variables to
|
||||
|
||||
Add following to your `.goreleaser.yaml` configuration to enable the WebHook functionality:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
announce:
|
||||
webhook:
|
||||
# Whether its enabled or not.
|
||||
|
@ -7,8 +7,7 @@ GoReleaser can create macOS App Bundles (a.k.a. `.app` files).
|
||||
|
||||
The `app_bundles` section specifies how the images should be created:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
app_bundles:
|
||||
- # ID of the resulting image.
|
||||
#
|
||||
|
@ -6,8 +6,7 @@ additional files, and format.
|
||||
|
||||
Here is a commented `archives` section with all fields specified:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
archives:
|
||||
- #
|
||||
# ID of this archive.
|
||||
@ -30,7 +29,7 @@ archives:
|
||||
# - `tar.xz`
|
||||
# - `txz`
|
||||
# - `tar.zst`
|
||||
# - `tzst` (since v2.1)
|
||||
# - `tzst` # <!-- md:inline_version v2.1 -->.
|
||||
# - `tar`
|
||||
# - `gz`
|
||||
# - `zip`
|
||||
@ -251,8 +250,7 @@ on the archive section.
|
||||
|
||||
A working hack is to use something like this:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
archives:
|
||||
- files:
|
||||
- none*
|
||||
@ -272,8 +270,7 @@ file inside.
|
||||
Presumably, you'll want that file to be the binary, so, your archive section
|
||||
will probably look like this:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
archives:
|
||||
- format: gz
|
||||
files:
|
||||
@ -292,8 +289,7 @@ extracted with something like `gzip -d file.gz`.
|
||||
|
||||
You can do that by setting `format` to `binary`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
archives:
|
||||
- format: binary
|
||||
```
|
||||
|
@ -134,8 +134,7 @@ puts:
|
||||
|
||||
Of course, you can customize a lot of things:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
artifactories:
|
||||
# You can have multiple Artifactory instances.
|
||||
- # Unique name of your artifactory instance. Used to identify the instance
|
||||
@ -211,7 +210,7 @@ artifactories:
|
||||
# If another file with the same name exists, the last one found will be used.
|
||||
# These globs can also include templates.
|
||||
#
|
||||
# Since: v2.1.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
extra_files:
|
||||
- glob: ./path/to/file.txt
|
||||
- glob: ./glob/**/to/**/file/**/*
|
||||
@ -224,8 +223,8 @@ artifactories:
|
||||
# Those files will have their contents pass through the template engine,
|
||||
# and its results will be uploaded.
|
||||
#
|
||||
# This feature is only available in GoReleaser Pro.
|
||||
# Since: v2.1 (pro).
|
||||
# <!-- md:inline_pro -->
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
# Templates: allowed.
|
||||
templated_extra_files:
|
||||
- src: LICENSE.tpl
|
||||
@ -233,7 +232,7 @@ artifactories:
|
||||
|
||||
# Upload only the files defined in extra_files.
|
||||
#
|
||||
# Since: v2.1.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
extra_files_only: true
|
||||
```
|
||||
|
||||
|
@ -10,8 +10,7 @@ a `PKGBUILD` to an _Arch User Repository_.
|
||||
|
||||
This page describes the available options.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
aurs:
|
||||
- # The package name.
|
||||
#
|
||||
|
@ -16,8 +16,7 @@ It'll run as the last step before the `publish` phase kicks in when running
|
||||
|
||||
Here's the list of options available:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
before_publish:
|
||||
- # IDs of the artifacts to filter for.
|
||||
#
|
||||
|
@ -10,16 +10,14 @@ with [GnuPG](https://www.gnupg.org/), and your default key.
|
||||
|
||||
To enable binary signing just add this to your configuration:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
binary_signs:
|
||||
- {}
|
||||
```
|
||||
|
||||
To customize the binary signing pipeline you can use the following options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
binary_signs:
|
||||
- #
|
||||
# ID of the sign config, must be unique.
|
||||
@ -129,8 +127,7 @@ You can sign your artifacts with [cosign][] as well.
|
||||
Assuming you have a `cosign.key` in the repository root and a `COSIGN_PWD`
|
||||
environment variable set, a simple usage example would look like this:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
binary_signs:
|
||||
- cmd: cosign
|
||||
stdin: "{{ .Env.COSIGN_PWD }}"
|
||||
|
@ -5,8 +5,7 @@ Google GCS.
|
||||
|
||||
## Customization
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
blobs:
|
||||
# You can have multiple blob configs
|
||||
- # Cloud provider name:
|
||||
@ -49,7 +48,8 @@ blobs:
|
||||
#
|
||||
# Artifacts that do not match this expression will be ignored.
|
||||
#
|
||||
# Since: v2.3 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.3 -->.
|
||||
# Templates: allowed.
|
||||
if: '{{ eq .Os "linux" }}'
|
||||
|
||||
|
@ -7,8 +7,7 @@ the name of the binary, flags, environment variables, hooks and more.
|
||||
|
||||
Here is a commented `builds` section with all fields specified:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
# You can have multiple builds defined as a yaml list
|
||||
- #
|
||||
@ -80,7 +79,7 @@ builds:
|
||||
# Templates: allowed.
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
# complex, templated envs (v1.14+):
|
||||
# complex, templated envs:
|
||||
- >-
|
||||
{{- if eq .Os "darwin" }}
|
||||
{{- if eq .Arch "amd64"}}CC=o64-clang{{- end }}
|
||||
@ -127,6 +126,7 @@ builds:
|
||||
# For more info refer to: https://go.dev/doc/install/source#environment
|
||||
#
|
||||
# Default: [ 'v8.0' ].
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
goarm64:
|
||||
- v9.0
|
||||
|
||||
@ -134,6 +134,7 @@ builds:
|
||||
# For more info refer to: https://go.dev/doc/install/source#environment
|
||||
#
|
||||
# Default: [ 'hardfloat' ].
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
gomips:
|
||||
- hardfloat
|
||||
- softfloat
|
||||
@ -142,6 +143,7 @@ builds:
|
||||
# For more info refer to: https://go.dev/doc/install/source#environment
|
||||
#
|
||||
# Default: [ 'sse2' ].
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
go386:
|
||||
- sse2
|
||||
- softfloat
|
||||
@ -150,6 +152,7 @@ builds:
|
||||
# For more info refer to: https://go.dev/doc/install/source#environment
|
||||
#
|
||||
# Default: [ 'power8' ].
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
goppc64:
|
||||
- power8
|
||||
- power9
|
||||
@ -158,6 +161,7 @@ builds:
|
||||
# For more info refer to: https://go.dev/doc/install/source#environment
|
||||
#
|
||||
# Default: [ 'rva20u64' ].
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
goriscv64:
|
||||
- rva22u64
|
||||
|
||||
@ -226,7 +230,7 @@ builds:
|
||||
# If true, skip the build.
|
||||
# Useful for library projects.
|
||||
#
|
||||
# Templates: allowed (since v2.3).
|
||||
# Templates: allowed (<!-- md:inline_version v2.3 -->).
|
||||
skip: false
|
||||
|
||||
# By default, GoReleaser will create your binaries inside
|
||||
@ -239,7 +243,7 @@ builds:
|
||||
# If you do, you are responsible for keeping different builds from
|
||||
# overriding each other.
|
||||
#
|
||||
# Templates: allowed (since v2.3).
|
||||
# Templates: allowed (<!-- md:inline_version v2.3 -->).
|
||||
no_unique_dist_dir: true
|
||||
|
||||
# By default, GoReleaser will check if the main filepath has a main
|
||||
@ -302,8 +306,7 @@ builds:
|
||||
|
||||
Here is an example with multiple binaries:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- main: ./cmd/cli
|
||||
id: "cli"
|
||||
@ -348,8 +351,7 @@ following build details are exposed:
|
||||
You can do that by using `{{ .Env.VARIABLE_NAME }}` in the template, for
|
||||
example:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- ldflags:
|
||||
- -s -w -X "main.goversion={{.Env.GOVERSION}}"
|
||||
@ -371,8 +373,7 @@ In addition to simple declarations as shown above _multiple_ hooks can be
|
||||
declared to help retaining reusability of config between different build
|
||||
environments.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- id: "with-hooks"
|
||||
targets:
|
||||
@ -389,8 +390,7 @@ builds:
|
||||
|
||||
Each hook can also have its own work directory and environment variables:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- id: "with-hooks"
|
||||
targets:
|
||||
@ -438,8 +438,7 @@ 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.yaml` file:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
@ -473,7 +472,7 @@ GoReleaser:
|
||||
|
||||
## Build Zig binaries
|
||||
|
||||
<!-- md:version v2.5 -->
|
||||
<!-- md:version v2.5-unreleased -->
|
||||
|
||||
<!-- md:alpha -->
|
||||
|
||||
@ -481,8 +480,7 @@ You can now build Zig binaries using `zig build` and GoReleaser!
|
||||
|
||||
Simply set the `builder` to `zig`, for instance:
|
||||
|
||||
```yml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- # Use zig
|
||||
builder: zig
|
||||
@ -519,8 +517,7 @@ Reasons you might want to do that include:
|
||||
|
||||
In any case, its pretty easy to do that now:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- # Set the builder to prebuilt
|
||||
builder: prebuilt
|
||||
@ -638,8 +635,7 @@ GoReleaser will:
|
||||
|
||||
Example usage:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- id: "my-library"
|
||||
|
||||
@ -663,8 +659,7 @@ Here are two different examples:
|
||||
This example creates once `CC_` and `CXX_` variable for each platform, and then
|
||||
set `CC` and `CXX` to the right one:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- id: mybin
|
||||
binary: mybin
|
||||
@ -692,8 +687,7 @@ builds:
|
||||
|
||||
This example uses `if` statements to set `CC` and `CXX`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- id: mybin
|
||||
binary: mybin
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
You can customize how the changelog is generated using the `changelog` section in the config file:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
changelog:
|
||||
# Set this to true if you don't want any changelog at all.
|
||||
#
|
||||
|
@ -5,8 +5,7 @@ release, so your users can validate if the downloaded files are correct.
|
||||
|
||||
The `checksum` section allows customizations of the filename:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
checksum:
|
||||
# You can change the name of the checksums file.
|
||||
#
|
||||
|
@ -9,8 +9,7 @@ You can read more about it in the [chocolatey docs](https://docs.chocolatey.org/
|
||||
|
||||
Available options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
chocolateys:
|
||||
- # Your app's package name.
|
||||
# The value may not contain spaces or character that are not valid for a URL.
|
||||
|
@ -15,8 +15,7 @@ token.
|
||||
Then, you need to pass your account name to GoReleaser and have your push token
|
||||
as an environment variable named `CLOUDSMITH_TOKEN`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
cloudsmiths:
|
||||
- organization: myorg
|
||||
repository: myrepo
|
||||
|
@ -3,8 +3,7 @@
|
||||
By default, GoReleaser will create its artifacts in the `./dist` folder.
|
||||
If you must, you can change it by setting it in the `.goreleaser.yaml` file:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
#
|
||||
# Default: './dist'.
|
||||
dist: another-folder-that-is-not-dist
|
||||
|
@ -6,8 +6,7 @@ GoReleaser can create DMG images for macOS using `mkisofs` or `hdiutil`.
|
||||
|
||||
The `dmg` section specifies how the images should be created:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
dmg:
|
||||
- # ID of the resulting image.
|
||||
#
|
||||
@ -33,14 +32,16 @@ dmg:
|
||||
# - 'appbundle': app bundles
|
||||
#
|
||||
# Default: 'binary'
|
||||
# Since: v2.4 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
use: appbundle
|
||||
|
||||
# Allows to further filter the artifacts.
|
||||
#
|
||||
# Artifacts that do not match this expression will be ignored.
|
||||
#
|
||||
# Since: v2.4 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
# Templates: allowed.
|
||||
if: '{{ eq .Os "linux" }}'
|
||||
|
||||
@ -65,7 +66,8 @@ dmg:
|
||||
# and its results will be added to the image as it would with the
|
||||
# extra_files field above.
|
||||
#
|
||||
# Since: v2.4 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
# Templates: allowed.
|
||||
templated_extra_files:
|
||||
- src: LICENSE.tpl
|
||||
|
@ -64,8 +64,7 @@ would follow their respective configuration's `name_templates`.
|
||||
|
||||
Of course, you can customize a lot of things:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
dockers:
|
||||
# You can have multiple Docker images.
|
||||
- #
|
||||
@ -212,8 +211,7 @@ install the generated packages instead of copying the binary and configs manuall
|
||||
Some users might want to keep their image name as generic as possible.
|
||||
That can be accomplished simply by adding template language in the definition:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
project_name: foo
|
||||
dockers:
|
||||
- image_templates:
|
||||
@ -232,8 +230,7 @@ Some users might want to push docker tags `:v1`, `:v1.6`,
|
||||
`:v1.6.4` and `:latest` when `v1.6.4` (for example) is built. That can be
|
||||
accomplished by using multiple `image_templates`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
dockers:
|
||||
- image_templates:
|
||||
- "myuser/myimage:{{ .Tag }}"
|
||||
@ -259,8 +256,7 @@ with multiple tags.
|
||||
Some users might want to push images to multiple docker registries. That can be
|
||||
accomplished by using multiple `image_templates`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
dockers:
|
||||
- image_templates:
|
||||
- "docker.io/myuser/myimage:{{ .Tag }}"
|
||||
@ -281,8 +277,7 @@ This will build and publish the following images to `docker.io` and `gcr.io`:
|
||||
Build flags can be applied using `build_flag_templates`.
|
||||
The flags must be valid Docker build flags.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
dockers:
|
||||
- image_templates:
|
||||
- "myuser/myimage"
|
||||
@ -314,8 +309,7 @@ the image. This builder is always available and backed by BuildKit in the
|
||||
Docker engine. If you want to use a different builder, you can specify it using
|
||||
the `build_flag_templates` field:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
dockers:
|
||||
- image_templates:
|
||||
- "myuser/myimage"
|
||||
@ -334,8 +328,7 @@ dockers:
|
||||
|
||||
You can use [`podman`](https://podman.io) instead of `docker` by setting `use` to `podman` on your config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
dockers:
|
||||
- image_templates:
|
||||
- "myuser/myimage"
|
||||
|
@ -24,8 +24,7 @@ the Docker images names.
|
||||
You can create several manifests in a single GoReleaser run, here are all the
|
||||
options available:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
docker_manifests:
|
||||
# You can have multiple Docker manifests.
|
||||
- # ID of the manifest, needed if you want to filter by it later on (e.g. on
|
||||
@ -104,8 +103,7 @@ COPY mybin /usr/bin/mybin
|
||||
Then, on our GoReleaser configuration file, we need to define both the
|
||||
`dockers`, and the `docker_manifests` section:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- env:
|
||||
- CGO_ENABLED=0
|
||||
@ -150,8 +148,7 @@ and push everything to Docker Hub.
|
||||
You can use [`podman`](https://podman.io) instead of `docker` by setting `use`
|
||||
to `podman` on your configuration:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
docker_manifests:
|
||||
- name_template: "foo/bar:{{ .Version }}"
|
||||
image_templates:
|
||||
|
@ -11,8 +11,7 @@ having [cosign](https://github.com/sigstore/cosign) in mind.
|
||||
|
||||
To customize the signing pipeline you can use the following options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
docker_signs:
|
||||
- # ID of the sign config, must be unique.
|
||||
# Only relevant if you want to produce some sort of signature file.
|
||||
@ -55,7 +54,8 @@ docker_signs:
|
||||
#
|
||||
# Artifacts that do not match this expression will be ignored.
|
||||
#
|
||||
# Since: v2.2 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.2 -->.
|
||||
# Templates: allowed.
|
||||
if: '{{ eq .Os "linux" }}'
|
||||
|
||||
@ -105,8 +105,7 @@ Assuming you have a `cosign.key` in the repository root and a `COSIGN_PWD`
|
||||
environment variable, the simplest configuration to sign both Docker images
|
||||
and manifests would look like this:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
docker_signs:
|
||||
- artifacts: all
|
||||
stdin: "{{ .Env.COSIGN_PWD }}"
|
||||
|
@ -5,8 +5,7 @@ Global environment variables to be passed down to all hooks and builds.
|
||||
If you have an environment variable named `FOOBAR` set to `on`, your
|
||||
`.goreleaser.yaml` file could use it like this:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
env:
|
||||
- FOO={{ .Env.FOOBAR }}
|
||||
- ENV_WITH_DEFAULT={{ if index .Env "ENV_WITH_DEFAULT" }}{{ .Env.ENV_WITH_DEFAULT }}{{ else }}default_value{{ end }}
|
||||
|
@ -11,8 +11,7 @@ First, you need to create an account on [Fury][fury] and get a push token.
|
||||
Then, you need to pass your account name to GoReleaser and have your push token
|
||||
as an environment variable named `FURY_TOKEN`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
furies:
|
||||
- account: myaccount
|
||||
```
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
This allows you to change the behavior of some Git commands.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
git:
|
||||
# What should be used to sort tags when gathering the current and previous
|
||||
# tags if there are more than one tag in the same commit.
|
||||
@ -39,8 +38,7 @@ git:
|
||||
|
||||
This allows you to sort tags by semver:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
git:
|
||||
tag_sort: semver
|
||||
```
|
||||
|
@ -10,8 +10,7 @@ and the
|
||||
[formula cookbook](https://github.com/Homebrew/brew/blob/master/docs/Formula-Cookbook.md)
|
||||
for more details.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
brews:
|
||||
-
|
||||
# Name of the recipe
|
||||
@ -270,8 +269,7 @@ your users, so they easily downgrade and/or keep using an older version.
|
||||
|
||||
To do that, use `alternative_names`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
brews:
|
||||
- name: foo
|
||||
alternative_names:
|
||||
|
@ -12,8 +12,7 @@ GoReleaser allows this with the global hooks feature.
|
||||
The configuration is straightforward, here is an example will all possible
|
||||
options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
before:
|
||||
# Templates for the commands to be ran.
|
||||
hooks:
|
||||
@ -34,8 +33,7 @@ GoReleaser allows this with the global hooks feature.
|
||||
The configuration is straightforward, here is an example will all possible
|
||||
options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
# global before hooks
|
||||
before:
|
||||
# Commands to be ran.
|
||||
|
@ -7,8 +7,7 @@ a URL or a file path.
|
||||
|
||||
Files are included recursively in the order they are declared.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
includes:
|
||||
- from_file:
|
||||
path: ./config/goreleaser.yaml
|
||||
|
@ -17,8 +17,7 @@ cached.
|
||||
For Ko to work you still need to login, either with `docker login` or
|
||||
something else.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
kos:
|
||||
- # ID of this image.
|
||||
id: foo
|
||||
@ -137,8 +136,7 @@ Refer to [ko's project page][ko] for more information.
|
||||
|
||||
Here's a minimal example:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
@ -173,8 +171,7 @@ and `darwin/arm64`, as well as the Docker images and manifest for Linux.
|
||||
KO will add the built manifest to the artifact list, so you can sign them with
|
||||
`docker_signs`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
docker_signs:
|
||||
- artifacts: manifests
|
||||
```
|
||||
|
@ -7,8 +7,7 @@ Check their [website](https://krew.sigs.k8s.io) for more information.
|
||||
|
||||
The `krews` section specifies how the plugins should be created:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
krews:
|
||||
-
|
||||
# Name of the recipe
|
||||
|
@ -5,8 +5,7 @@ finishes running.
|
||||
|
||||
You can also set some global defaults that can be used by other features.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
metadata:
|
||||
# Set the modified timestamp on the metadata files.
|
||||
#
|
||||
@ -16,31 +15,31 @@ metadata:
|
||||
# The maintainers of this software.
|
||||
# Most features will only use the first maintainer defined here.
|
||||
#
|
||||
# This feature is only available in GoReleaser Pro.
|
||||
# Since: v2.1 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
# Templates: allowed.
|
||||
maintainers:
|
||||
- "Foo Bar <foo at bar dot com>"
|
||||
|
||||
# SPDX identifier of your app's license.
|
||||
#
|
||||
# This feature is only available in GoReleaser Pro.
|
||||
# Since: v2.1 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
# Templates: allowed.
|
||||
license: "MIT"
|
||||
|
||||
# Your homepage.
|
||||
#
|
||||
# This feature is only available in GoReleaser Pro.
|
||||
# Since: v2.1 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
# Templates: allowed.
|
||||
homepage: "https://example.com/"
|
||||
|
||||
# Your app's description.
|
||||
# Sometimes also referred as "short description".
|
||||
#
|
||||
# This feature is only available in GoReleaser Pro.
|
||||
# Since: v2.1 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
# Templates: allowed.
|
||||
description: "Software to create fast and easy drum rolls."
|
||||
|
||||
@ -49,8 +48,8 @@ metadata:
|
||||
# It can be a string directly, or you can use `from_url` or `from_file` to
|
||||
# source it from somewhere else.
|
||||
#
|
||||
# This feature is only available in GoReleaser Pro.
|
||||
# Since: v2.1 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
# Templates: allowed.
|
||||
full_description:
|
||||
# Loads from an URL.
|
||||
|
@ -5,8 +5,7 @@ artifacts.
|
||||
|
||||
Let's see what can be customized in the `milestones` section:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
milestones:
|
||||
# You can have multiple milestone configs
|
||||
- # Repository for the milestone
|
||||
|
@ -58,8 +58,7 @@ The rest of the release process should work as usual.
|
||||
You'll need to create a `.goreleaser.yaml` for your Go code in the root of the
|
||||
project:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
monorepo:
|
||||
tag_prefix: v
|
||||
```
|
||||
|
@ -6,8 +6,7 @@ GoReleaser can create MSI installers for windows binaries using [msitools][].
|
||||
|
||||
The `msi` section specifies how the **installers** should be created:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
msi:
|
||||
- # ID of the resulting installer.
|
||||
#
|
||||
|
@ -5,8 +5,7 @@ generate and publish `.deb`, `.rpm`, `.apk`, `.ipk`, and Archlinux packages.
|
||||
|
||||
Available options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
nfpms:
|
||||
# note that this is an array of nfpm configs
|
||||
- #
|
||||
@ -37,7 +36,8 @@ nfpms:
|
||||
#
|
||||
# Artifacts that do not match this expression will be ignored.
|
||||
#
|
||||
# Since: v2.4 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.4 -->.
|
||||
# Templates: allowed.
|
||||
if: '{{ eq .Os "linux" }}'
|
||||
|
||||
@ -473,7 +473,7 @@ nfpms:
|
||||
|
||||
# Custom configuration applied only to the IPK packager.
|
||||
#
|
||||
# Since: v2.1.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
ipk:
|
||||
# The ABI version to specify.
|
||||
#
|
||||
@ -566,8 +566,7 @@ get duplicated file names.
|
||||
|
||||
You can go around that with something like this:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
nfpms:
|
||||
- # ...
|
||||
file_name_template: >-
|
||||
|
@ -10,8 +10,7 @@ To enable it, you must use the `--nightly` flag in the
|
||||
|
||||
You also have some customization options available:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
nightly:
|
||||
# Allows you to change the version of the generated nightly release.
|
||||
#
|
||||
|
@ -5,8 +5,7 @@ a _nix derivation_ to an existing [Nix User Repository][nur].
|
||||
|
||||
The `nix` section specifies how the pkgs should be created:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
nix:
|
||||
- #
|
||||
# Name of the recipe
|
||||
|
@ -21,8 +21,7 @@ So you should end up with:
|
||||
|
||||
Read the commented configuration excerpt below to learn how to use these files.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
notarize:
|
||||
macos:
|
||||
- # Whether this configuration is enabled or not.
|
||||
|
@ -4,7 +4,6 @@ The project name is used in the name of the Brew formula, archives, etc.
|
||||
If none is given, it will be inferred from the name of the GitHub, GitLab, or
|
||||
Gitea release.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
project_name: myproject
|
||||
```
|
||||
|
@ -93,8 +93,7 @@ Supported variables:
|
||||
|
||||
Of course, you can customize a lot of things:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
publishers:
|
||||
- #
|
||||
# Unique name of your publisher. Used for identification
|
||||
|
@ -8,8 +8,7 @@ previous tag.
|
||||
|
||||
Let's see what can be customized in the `release` section for GitHub:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
release:
|
||||
# Repo in which the release will be created.
|
||||
# Default: extracted from the origin remote URL or empty if its private hosted.
|
||||
@ -209,8 +208,7 @@ release:
|
||||
|
||||
Let's see what can be customized in the `release` section for GitLab.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
release:
|
||||
# Default: extracted from the origin remote URL or empty if its private
|
||||
# hosted.
|
||||
@ -275,8 +273,7 @@ release:
|
||||
|
||||
You can also configure the `release` section to upload to a [Gitea](https://gitea.io) instance:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
release:
|
||||
gitea:
|
||||
owner: user
|
||||
|
@ -17,8 +17,7 @@ output, as well as on `dist/artifacts.json`:
|
||||
|
||||
Here's the available configuration options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
# Whether to enable the size reporting or not.
|
||||
report_sizes: true
|
||||
```
|
||||
|
@ -14,16 +14,14 @@ GoReleaser and output one or more SBOM files into the dist directory.
|
||||
The default is configured to create an SBOM for each binary produced with
|
||||
[Syft](https://github.com/anchore/syft). To enable artifact cataloging just add:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
sboms:
|
||||
- artifacts: archive
|
||||
```
|
||||
|
||||
To customize the artifact cataloging pipeline you can use the following options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
sboms:
|
||||
- # ID of the sbom config, must be unique.
|
||||
#
|
||||
|
@ -6,8 +6,7 @@ _Scoop App Manifest_ into a repository that you have access to.
|
||||
The `scoop` section specifies how the manifest should be created. See the
|
||||
commented example below:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
scoops:
|
||||
- # Name of the recipe
|
||||
#
|
||||
|
@ -16,16 +16,14 @@ with [GnuPG](https://www.gnupg.org/), and your default key.
|
||||
|
||||
To enable signing just add this to your configuration:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
signs:
|
||||
- artifacts: checksum
|
||||
```
|
||||
|
||||
To customize the signing pipeline you can use the following options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
signs:
|
||||
- #
|
||||
# ID of the sign config, must be unique.
|
||||
@ -81,7 +79,8 @@ signs:
|
||||
#
|
||||
# Artifacts that do not match this expression will be ignored.
|
||||
#
|
||||
# Since: v2.2 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.2 -->.
|
||||
# Templates: allowed.
|
||||
if: '{{ eq .Os "linux" }}'
|
||||
|
||||
@ -134,8 +133,7 @@ You can sign your artifacts with [cosign][] as well.
|
||||
Assuming you have a `cosign.key` in the repository root and a `COSIGN_PWD`
|
||||
environment variable set, a simple usage example would look like this:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
signs:
|
||||
- cmd: cosign
|
||||
stdin: "{{ .Env.COSIGN_PWD }}"
|
||||
@ -169,8 +167,7 @@ Executables can be signed after build using post hooks.
|
||||
|
||||
For example, you can use [gon][gon-fork] to create notarized macOS apps:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- binary: foo
|
||||
id: foo
|
||||
@ -229,8 +226,7 @@ details.
|
||||
You can also use [cosign][] to sign the binaries directly, but you'll need to
|
||||
manually add the `.sig` files to the release and/or archive:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- hooks:
|
||||
post:
|
||||
@ -261,8 +257,7 @@ being signed.
|
||||
If you want to sign with something that writes to `STDOUT` instead of a file,
|
||||
you can wrap the command inside a `sh -c` execution, for instance:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
signs:
|
||||
- cmd: sh
|
||||
args:
|
||||
|
@ -15,8 +15,7 @@ You can read more about it in the [snapcraft docs](https://snapcraft.io/docs/).
|
||||
|
||||
Available options:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
snapcrafts:
|
||||
- #
|
||||
# ID of the snapcraft config, must be unique.
|
||||
|
@ -6,8 +6,7 @@ but neither want to validate anything nor upload it to anywhere.
|
||||
GoReleaser supports this with the `--snapshot` flag and with the `snapshot`
|
||||
customization section:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
snapshot:
|
||||
# Allows you to change the name of the generated snapshot
|
||||
#
|
||||
|
@ -3,8 +3,7 @@
|
||||
You may add the current tag source archive to the release as well. This is
|
||||
particularly useful if you want to sign it, for example.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
source:
|
||||
# Whether this pipe is enabled or not.
|
||||
enabled: true
|
||||
|
@ -8,8 +8,7 @@ script.
|
||||
|
||||
All the templated files are uploaded to the release by default.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
template_files:
|
||||
- # ID of this particular file.
|
||||
#
|
||||
|
@ -218,8 +218,7 @@ files.
|
||||
|
||||
Usage is as simple as you would expect:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
variables:
|
||||
description: my project description
|
||||
somethingElse: yada yada yada
|
||||
|
@ -6,8 +6,7 @@ executables in a single file.
|
||||
|
||||
Here's how to use it:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
universal_binaries:
|
||||
- # ID of the resulting universal binary.
|
||||
#
|
||||
@ -59,8 +58,7 @@ For more info about hooks, see the [build section](./builds.md#build-hooks).
|
||||
|
||||
The minimal configuration for most setups would look like this:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
universal_binaries:
|
||||
- replace: true
|
||||
```
|
||||
|
@ -146,8 +146,7 @@ uploads:
|
||||
|
||||
Of course, you can customize a lot of things:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
uploads:
|
||||
# You can have multiple upload instances.
|
||||
- # Unique name of your upload instance. Used to identify the instance.
|
||||
@ -238,7 +237,7 @@ uploads:
|
||||
# If another file with the same name exists, the last one found will be used.
|
||||
# These globs can also include templates.
|
||||
#
|
||||
# Since: v2.1.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
extra_files:
|
||||
- glob: ./path/to/file.txt
|
||||
- glob: ./docs/*.md
|
||||
@ -253,8 +252,8 @@ uploads:
|
||||
# Those files will have their contents pass through the template engine,
|
||||
# and its results will be uploaded.
|
||||
#
|
||||
# This feature is only available in GoReleaser Pro.
|
||||
# Since: v2.1 (pro).
|
||||
# <!-- md:inline_pro -->.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
# Templates: allowed.
|
||||
templated_extra_files:
|
||||
- src: LICENSE.tpl
|
||||
@ -262,7 +261,7 @@ uploads:
|
||||
|
||||
# Upload only the files defined in extra_files.
|
||||
#
|
||||
# Since: v2.1.
|
||||
# <!-- md:inline_version v2.1 -->.
|
||||
extra_files_only: true
|
||||
```
|
||||
|
||||
|
@ -17,8 +17,7 @@ and now UPX has its own configuration section:
|
||||
|
||||
Namely, _macOS Ventura_ is not supported at the moment.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
upx:
|
||||
- # Whether to enable it or not.
|
||||
#
|
||||
|
@ -6,8 +6,7 @@ if instructed to.
|
||||
|
||||
The `winget` section specifies how the **manifests** should be created:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
winget:
|
||||
- # Name of the recipe
|
||||
#
|
||||
|
@ -25,8 +25,7 @@ If you have more than one of these files, but for a particular project, you want
|
||||
to force one of them, you can explicitly disable the others by setting them to a
|
||||
file you know won't exist:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
env_files:
|
||||
gitlab_token: ~/nope
|
||||
gitea_token: ~/nope
|
||||
@ -46,7 +45,6 @@ GoReleaser will then unset `GITHUB_TOKEN` and proceed.
|
||||
|
||||
You can also force a token by using `force_token` in your config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
force_token: gitea
|
||||
```
|
||||
|
@ -16,8 +16,7 @@ Learn more at https://goreleaser.com/errors/no-main
|
||||
|
||||
Add something like this to your config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- skip: true
|
||||
```
|
||||
@ -26,8 +25,7 @@ builds:
|
||||
|
||||
Add something like this to your config:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- main: ./path/to/your/main/pkg/
|
||||
```
|
||||
@ -42,8 +40,7 @@ Run goreleaser in the root of the project.
|
||||
|
||||
You can set `no_main_check` to `true`:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
builds:
|
||||
- main: ./path/...
|
||||
buildmode: plugin
|
||||
|
@ -55,8 +55,7 @@ We would need to change the workflow file:
|
||||
|
||||
And also the `.goreleaser.yaml` file:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
# ...
|
||||
brews:
|
||||
- name: myproject
|
||||
|
@ -22,8 +22,7 @@ You can also push to a fork, and open the pull request in the original branch.
|
||||
|
||||
Here's an example on how to set it up:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
# ...
|
||||
something: # can be nix, brews, etc...
|
||||
- repository:
|
||||
|
@ -16,8 +16,10 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files:
|
||||
type, args = match.groups()
|
||||
args = args.strip()
|
||||
if type == "version": return _version_block(args)
|
||||
elif type == "pro": return _pro_ad(page, files)
|
||||
elif type == "featpro": return _pro_feat_ad(page, files)
|
||||
if type == "inline_version": return _inline_version_block(args)
|
||||
elif type == "pro": return _pro_ad()
|
||||
elif type == "inline_pro": return _inline_pro_ad()
|
||||
elif type == "featpro": return _pro_feat_ad()
|
||||
elif type == "templates": return _templates_ad()
|
||||
elif type == "alpha": return _alpha_block()
|
||||
|
||||
@ -30,7 +32,7 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files:
|
||||
replace, markdown, flags = re.I | re.M
|
||||
)
|
||||
|
||||
def _pro_feat_ad(page: Page, files: Files):
|
||||
def _pro_feat_ad():
|
||||
return "".join([
|
||||
f"<div class=\"admonition example\">",
|
||||
f"<p class=\"admonition-title\">GoReleaser Pro</p>",
|
||||
@ -38,7 +40,7 @@ def _pro_feat_ad(page: Page, files: Files):
|
||||
f"</div>"
|
||||
])
|
||||
|
||||
def _pro_ad(page: Page, files: Files):
|
||||
def _pro_ad():
|
||||
return "".join([
|
||||
f"<div class=\"admonition example\">",
|
||||
f"<p class=\"admonition-title\">GoReleaser Pro</p>",
|
||||
@ -46,9 +48,21 @@ def _pro_ad(page: Page, files: Files):
|
||||
f"</div>"
|
||||
])
|
||||
|
||||
def _inline_pro_ad():
|
||||
return f"This feature is only available in GoReleaser Pro."
|
||||
|
||||
def _version_block(text: str):
|
||||
if "unreleased" in text:
|
||||
tag = text.removesuffix("-unreleased")
|
||||
return f"> :material-tag-outline: This will be available in the next release ({tag}). Stay tuned!"
|
||||
return f"> :material-tag-outline: Since <a href=\"/blog/goreleaser-{text}\">{text}</a>."
|
||||
|
||||
def _inline_version_block(text: str):
|
||||
if "unreleased" in text:
|
||||
tag = text.removesuffix("-unreleased")
|
||||
return f"Since: {tag} (unreleased)"
|
||||
return f"Since: {text}"
|
||||
|
||||
def _alpha_block():
|
||||
return f"> :material-flask-outline: This feature is currently in alpha. Feedback is greatly appreciated!"
|
||||
|
||||
|
@ -10,8 +10,7 @@ This token should be added to the environment variables as `GITEA_TOKEN`.
|
||||
Alternatively, you can provide the Gitea token in a file.
|
||||
GoReleaser will check `~/.config/goreleaser/gitea_token` by default, but you can change that in the `.goreleaser.yaml` file:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
env_files:
|
||||
gitea_token: ~/.path/to/my/gitea_token
|
||||
```
|
||||
@ -24,8 +23,7 @@ Note that the environment variable will be used if available, regardless of the
|
||||
You can use GoReleaser with Gitea by providing its URLs in
|
||||
the `.goreleaser.yaml` configuration file. This takes a normal string, or a template value.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
gitea_urls:
|
||||
api: https://gitea.myinstance.com/api/v1
|
||||
download: https://gitea.myinstance.com
|
||||
|
@ -12,8 +12,7 @@ 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
|
||||
```yaml title=".goreleaser.yaml"
|
||||
env_files:
|
||||
github_token: ~/.path/to/my/github_token
|
||||
```
|
||||
@ -27,8 +26,7 @@ You can use GoReleaser with GitHub Enterprise by providing its URLs in the
|
||||
`.goreleaser.yaml` configuration file. This takes a normal string, or a template
|
||||
value.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
github_urls:
|
||||
api: https://git.company.com/api/v3/
|
||||
upload: https://git.company.com/api/uploads/
|
||||
|
@ -10,8 +10,7 @@ This token should be added to the environment variables as `GITLAB_TOKEN`.
|
||||
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
|
||||
```yaml title=".goreleaser.yaml"
|
||||
env_files:
|
||||
gitlab_token: ~/.path/to/my/gitlab_token
|
||||
```
|
||||
@ -34,8 +33,7 @@ env_files:
|
||||
You can use GoReleaser with GitLab Enterprise by providing its URLs in the
|
||||
`.goreleaser.yml` configuration file. This takes a normal string, or a template value.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
gitlab_urls:
|
||||
api: https://gitlab.mycompany.com/api/v4/
|
||||
download: https://gitlab.company.com
|
||||
@ -69,8 +67,7 @@ Notably, hosted GitLab instances have a 10MB attachment limit, which cannot be c
|
||||
Uploading to the Generic Package Registry does not have this restriction.
|
||||
To use it instead, set `use_package_registry` to `true`.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
```yaml title=".goreleaser.yaml"
|
||||
gitlab_urls:
|
||||
use_package_registry: true
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user