Back to Goreleaser

Deprecation notices

www/content/resources/deprecations.md

2.15.420.6 KB
Original Source

This page is used to list deprecation notices across GoReleaser.

Deprecated options are only removed on major versions of GoReleaser. Deprecated versions on features deemed experimental (you see a warning when using them) might be removed in feature releases.

Nevertheless, it's a good thing to keep your configuration up-to-date to prevent any issues.

You can check your use of deprecated configurations by running:

sh
goreleaser check

Active deprecation notices

<!-- Template for new deprecations: ### property > since v2.xx Description. PS: Don't forget to add it to cmd/mcp.go as well! {{< tabs >}} {{< tab "Before" >}} ```yaml foo: bar ``` {{< /tab >}} {{< tab "After" >}} ```yaml foo: bar ``` {{< /tab >}} {{< /tabs >}} -->

dockers_v2.retry

since v2.15.3

All retry configuration was moved to the root of the configuration file:

{{< tabs >}} {{< tab "Before" >}}

yaml
dockers_v2:
  - retry:
      attempts: 3
      delay: 5s
      max_delay: 1m

{{< /tab >}} {{< tab "After" >}}

yaml
retry:
  attempts: 3
  delay: 5s
  max_delay: 1m

{{< /tab >}} {{< /tabs >}}

docker_manifests.retry

since v2.15.3

All retry configuration was moved to the root of the configuration file:

{{< tabs >}} {{< tab "Before" >}}

yaml
docker_manifests:
  - retry:
      attempts: 3
      delay: 5s
      max_delay: 1m

{{< /tab >}} {{< tab "After" >}}

yaml
retry:
  attempts: 3
  delay: 5s
  max_delay: 1m

{{< /tab >}} {{< /tabs >}}

dockers.retry

since v2.15.3

All retry configuration was moved to the root of the configuration file:

{{< tabs >}} {{< tab "Before" >}}

yaml
dockers:
  - retry:
      attempts: 3
      delay: 5s
      max_delay: 1m

{{< /tab >}} {{< tab "After" >}}

yaml
retry:
  attempts: 3
  delay: 5s
  max_delay: 1m

{{< /tab >}} {{< /tabs >}}

furies

since v2.14

furies was renamed to gemfury for clarity.

{{< tabs >}} {{< tab "Before" >}}

yaml
furies:
  - account: myaccount

{{< /tab >}} {{< tab "After" >}}

yaml
gemfury:
  - account: myaccount

{{< /tab >}} {{< /tabs >}}

mcp.github

since v2.13.1

The MCP configuration was initially nested under github, but the registry is actually run by the MCP committee, not GitHub specifically. The configuration should now be at the top level of mcp.

{{< tabs >}} {{< tab "Before" >}}

yaml
mcp:
  github:
    name: io.github.user/myserver
    title: "My MCP Server"
    description: "MCP server for my project"
    # ...

{{< /tab >}} {{< tab "After" >}}

yaml
mcp:
  name: io.github.user/myserver
  title: "My MCP Server"
  description: "MCP server for my project"
  # ...

{{< /tab >}} {{< /tabs >}}

homebrew_casks.binary

since v2.12.6

It should now be in plural form.

{{< tabs >}} {{< tab "Before" >}}

yaml
homebrew_casks:
  - binary: foo

{{< /tab >}} {{< tab "After" >}}

yaml
homebrew_casks:
  - binaries: [foo]

{{< /tab >}} {{< /tabs >}}

dockers

We're re-implementing the docker feature from the ground up.

The configuration now is way more concise, and the implementation is simpler as well.

Before, you would have to setup dockers and docker_manifests, now, only dockers (provisionally being called dockers_v2) is needed to achieve the same things.

Then, instead of building the images, pushing them, and then building the manifests and pushing them, we will now run a single docker buildx build with the given platforms, which will build and publish the manifest and SBOM.

{{< tabs >}} {{< tab "Before" >}}

yaml
dockers:
  - image_templates:
      - "foo/bar:v{{ .Version }}-amd64"
      - "ghcr.io/foo/bar:v{{ .Version }}-amd64"
    dockerfile: Dockerfile
    use: buildx
    build_flag_templates:
      - "--pull"
      - "--label=org.opencontainers.image.description=Foo bar"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.name={{.ProjectName}}"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
      - "--label=org.opencontainers.image.source={{.GitURL}}"
      - "--platform=linux/amd64"
  - image_templates:
      - "foo/bar:v{{ .Version }}-arm64"
      - "ghcr.io/foo/bar:v{{ .Version }}-arm64"
    dockerfile: Dockerfile
    use: buildx
    build_flag_templates:
      - "--pull"
      - "--label=org.opencontainers.image.description=Foo bar"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.name={{.ProjectName}}"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
      - "--label=org.opencontainers.image.source={{.GitURL}}"
      - "--platform=linux/arm64"
    goarch: arm64

docker_manifests:
  - name_template: "foo/bar:v{{ .Version }}"
    image_templates:
      - "foo/bar:v{{ .Version }}-amd64"
      - "foo/bar:v{{ .Version }}-arm64"
  - name_template: "ghcr.io/foo/bar:v{{ .Version }}"
    image_templates:
      - "ghcr.io/foo/bar:v{{ .Version }}-amd64"
      - "ghcr.io/foo/bar:v{{ .Version }}-arm64"
  - name_template: "{{ if not .IsNightly }}foo/bar:latest{{ end }}"
    image_templates:
      - "foo/bar:v{{ .Version }}-amd64"
      - "foo/bar:v{{ .Version }}-arm64"
  - name_template: "{{ if not .IsNightly }}ghcr.io/foo/bar:latest{{ end }}"
    image_templates:
      - "ghcr.io/foo/bar:v{{ .Version }}-amd64"
      - "ghcr.io/foo/bar:v{{ .Version }}-arm64"
  - name_template: "{{ if .IsNightly }}foo/bar:nightly{{ end }}"
    image_templates:
      - "foo/bar:v{{ .Version }}-amd64"
      - "foo/bar:v{{ .Version }}-arm64"
  - name_template: "{{ if .IsNightly }}ghcr.io/foo/bar:nightly{{ end }}"
    image_templates:
      - "ghcr.io/foo/bar:v{{ .Version }}-amd64"
      - "ghcr.io/foo/bar:v{{ .Version }}-arm64"

{{< /tab >}} {{< tab "After" >}}

yaml
dockers_v2:
  - images:
      - "foo/bar"
      - "ghcr.io/foo/bar"
    tags:
      - "v{{ .Version }}"
      - "{{ if .IsNightly }}nightly{{ end }}"
      - "{{ if not .IsNightly }}latest{{ end }}"
    labels:
      "org.opencontainers.image.description": "Foo bar"
      "org.opencontainers.image.created": "{{.Date}}"
      "org.opencontainers.image.name": "{{.ProjectName}}"
      "org.opencontainers.image.revision": "{{.FullCommit}}"
      "org.opencontainers.image.version": "{{.Version}}"
      "org.opencontainers.image.source": "{{.GitURL}}"

{{< /tab >}} {{< /tabs >}}

As you can see, it's a lot simpler. The resulting images are the same, a combination of all the non-empty images with all the non-empty tags.

This will also require a small change in your Dockerfile when copying from the context:

{{< tabs >}} {{< tab "Before" >}}

dockerfile
FROM alpine
COPY my-binary /usr/bin

{{< /tab >}} {{< tab "After" >}}

dockerfile
FROM alpine
ARG TARGETPLATFORM
COPY $TARGETPLATFORM/my-binary /usr/bin

{{< /tab >}} {{< /tabs >}}

GoReleaser will automatically setup the context in such a way that all the artifacts for the given target platform will be located within $TARGETPLATFORM/.

When running a --snapshot build, GoReleaser will append the platform to the tags, and will create Docker images instead of manifests, as manifests can't be created without pushing.

Feel free to suggest improvements here.

Regarding signing, you may also remove the artifacts option from you docker_signs:

{{< tabs >}} {{< tab "Before" >}}

yaml
docker_signs:
  - artifacts: images
    # etc..

{{< /tab >}} {{< tab "After" >}}

yaml
docker_signs:
  -  # etc..

{{< /tab >}} {{< /tabs >}}

Since in the future we'll only have the docker image type, the artifacts property will eventually be deprecated and removed.

homebrew_casks.conflicts.formula

since v2.12

It was a no-op before, and is now removed from Homebrew.

{{< tabs >}} {{< tab "Before" >}}

yaml
homebrew_casks:
  - conflicts:
      - formula: foo

{{< /tab >}} {{< tab "After" >}}

yaml
homebrew_casks:
  - {}

{{< /tab >}} {{< /tabs >}}

homebrew_casks.manpage

since v2.11

You may now define multiple man pages, which was not possible in v2.10.

{{< tabs >}} {{< tab "Before" >}}

yaml
homebrew_casks:
  - manpage: foo.1.gz

{{< /tab >}} {{< tab "After" >}}

yaml
homebrew_casks:
  - manpages:
      - foo.1.gz

{{< /tab >}} {{< /tabs >}}

brews

since v2.10

Historically, GoReleaser would generate hackyish formulas that would install the pre-compiled binaries. This was the only way to do it for Linuxbrew at the time, but this is no longer true, and Casks should be used instead.

That said, we now have a homebrew_casks section!

For simple cases, simply replacing one with the other will be good enough. More complex settings might require further change. Check the new documentation for more details.

Once you do the first release this way, you might also want to delete the old Formulas from your Tap. You may also want to make the Cask conflict with the previous Formula.

{{< tabs >}} {{< tab "Before" >}}

yaml
brews:
  - name: foo
    directory: Formulas

{{< /tab >}} {{< tab "After" >}}

yaml
homebrew_casks:
  - name: foo
    # Optional: either set it to Casks, or remove it:
    directory: Casks

    # Optional: helps pass `homebrew audit` if homepage is different from download domain:
    url:
      verified: github.com/myorg/myrepo

    # Optional: if your app/binary isn't signed and notarized, you'll need this:
    hooks:
      post:
        # replace foo with the actual binary name
        install: |
          if OS.mac?
            system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/foo"]
          end

{{< /tab >}} {{< /tabs >}}

[!WARNING] Don't forget to remove the directory: Formula from your configuration. Casks need to be in the Casks directory - which is the default.

The preferred way to migrate is to create a tap_migrations.json file in the root of your tap:

json
{
  "foo": "foo"
}

And then delete the Formula:

sh
rm Formula/foo.rb

With this, when the user tries to upgrade, it should automatically update to the Cask instead.

archives.builds

since v2.8

The builds field has been replaced with the ids, which is the nomenclature used everywhere else.

{{< tabs >}} {{< tab "Before" >}}

yaml
archives:
  builds: [a, b]

{{< /tab >}} {{< tab "After" >}}

yaml
archives:
  ids: [a, b]

{{< /tab >}} {{< /tabs >}}

snaps.builds

since v2.8

The builds field has been replaced with the ids, which is the nomenclature used everywhere else.

{{< tabs >}} {{< tab "Before" >}}

yaml
snaps:
  builds: [a, b]

{{< /tab >}} {{< tab "After" >}}

yaml
snaps:
  ids: [a, b]

{{< /tab >}} {{< /tabs >}}

nfpms.builds

since v2.8

The builds field has been replaced with the ids, which is the nomenclature used everywhere else.

{{< tabs >}} {{< tab "Before" >}}

yaml
nfpms:
  builds: [a, b]

{{< /tab >}} {{< tab "After" >}}

yaml
nfpms:
  ids: [a, b]

{{< /tab >}} {{< /tabs >}}

archives.format

since v2.6

Format was renamed to formats, and now accepts a list of formats.

{{< tabs >}} {{< tab "Before" >}}

yaml
archives:
  - format: zip

{{< /tab >}} {{< tab "After" >}}

yaml
archives:
  - formats: ["zip"]

{{< /tab >}} {{< /tabs >}}

[!NOTE] It will still accept a single string, e.g.: formats: zip. In most cases you can simply rename the property to formats.

archives.format_overrides.format

since v2.6

Format was renamed to formats, and now accepts a list of formats.

[!NOTE] It will still accept a single string, e.g.: formats: zip. In most cases you can simply rename the property to formats.

{{< tabs >}} {{< tab "Before" >}}

yaml
archives:
  - format_overrides:
      - format: zip

{{< /tab >}} {{< tab "After" >}}

yaml
archives:
  - format_overrides:
      - formats: ["zip"]

{{< /tab >}} {{< /tabs >}}

[!NOTE] It will still accept a single string, e.g.: formats: zip. In most cases you can simply rename the property to formats.

kos.repository

since v2.5

Use repositories instead. It allows to create multiple images with Ko, without having to rebuild each of them.

{{< tabs >}} {{< tab "Before" >}}

yaml
kos:
  - repository: foo/bar

{{< /tab >}} {{< tab "After" >}}

yaml
kos:
  - repositories:
      - foo/bar

{{< /tab >}} {{< /tabs >}}

builds.gobinary

since v2.5

The property was renamed to tool, as to better accommodate multiple languages.

{{< tabs >}} {{< tab "Before" >}}

yaml
builds:
  - gobinary: "go1.2.3"

{{< /tab >}} {{< tab "After" >}}

yaml
builds:
  - tool: "go1.2.3"

{{< /tab >}} {{< /tabs >}}

kos.sbom

since v2.2

Ko removed support for cyclonedx and go.version-m SBOMs from upstream. You can now either use spdx or none. From now on, these two options will be replaced by none. We recommend you change it to spdx.

nightly.name_template

since v2.2

Property renamed so its easier to reason about.

{{< tabs >}} {{< tab "Before" >}}

yaml
nightly:
  name_template: "foo"

{{< /tab >}} {{< tab "After" >}}

yaml
nightly:
  version_template: "foo"

{{< /tab >}} {{< /tabs >}}

snapshot.name_template

since v2.2

Property renamed so its easier to reason about.

{{< tabs >}} {{< tab "Before" >}}

yaml
snapshot:
  name_template: "foo"

{{< /tab >}} {{< tab "After" >}}

yaml
snapshot:
  version_template: "foo"

{{< /tab >}} {{< /tabs >}}

Removed in v2

archives.strip_parent_binary_folder

since 2024-03-29 (v1.25), removed 2024-05-26 (v2.0)

Property was renamed to be consistent across all configurations.

{{< tabs >}} {{< tab "Before" >}}

yaml
archives:
  - strip_parent_binary_folder: true

{{< /tab >}} {{< tab "After" >}}

yaml
archives:
  - strip_binary_directory: true

{{< /tab >}} {{< /tabs >}}

blobs.folder

since 2024-03-29 (v1.25), removed 2024-05-26 (v2.0)

Property was renamed to be consistent across all configurations.

{{< tabs >}} {{< tab "Before" >}}

yaml
blobs:
  - folder: foo

{{< /tab >}} {{< tab "After" >}}

yaml
blobs:
  - directory: foo

{{< /tab >}} {{< /tabs >}}

brews.folder

since 2024-03-29 (v1.25), removed 2024-05-26 (v2.0)

Property was renamed to be consistent across all configurations.

{{< tabs >}} {{< tab "Before" >}}

yaml
brews:
  - folder: foo

{{< /tab >}} {{< tab "After" >}}

yaml
brews:
  - directory: foo

{{< /tab >}} {{< /tabs >}}

scoops.folder

since 2024-03-29 (v1.25), removed 2024-05-26 (v2.0)

Property was renamed to be consistent across all configurations.

{{< tabs >}} {{< tab "Before" >}}

yaml
scoops:
  - folder: foo

{{< /tab >}} {{< tab "After" >}}

yaml
scoops:
  - directory: foo

{{< /tab >}} {{< /tabs >}}

furies.skip

since 2024-03-03 (v1.25), removed 2024-05-26 (v2.0)

Changed to disable to conform with all other pipes.

{{< tabs >}} {{< tab "Before" >}}

yaml
furies:
  - skip: true

{{< /tab >}} {{< tab "After" >}}

yaml
furies:
  - disable: true

{{< /tab >}} {{< /tabs >}}

changelog.skip

since 2024-01-14 (v1.24), removed 2024-05-26 (v2.0)

Changed to disable to conform with all other pipes.

{{< tabs >}} {{< tab "Before" >}}

yaml
changelog:
  skip: true

{{< /tab >}} {{< tab "After" >}}

yaml
changelog:
  disable: true

{{< /tab >}} {{< /tabs >}}

blobs.kmskey

since 2024-01-07 (v1.24), removed 2024-05-26 (v2.0)

Changed to kms_key to conform with all other options.

{{< tabs >}} {{< tab "Before" >}}

yaml
blobs:
  - kmskey: foo

{{< /tab >}} {{< tab "After" >}}

yaml
blobs:
  - kms_key: foo

{{< /tab >}} {{< /tabs >}}

blobs.disableSSL

since 2024-01-07 (v1.24), removed 2024-05-26 (v2.0)

Changed to disable_ssl to conform with all other options.

{{< tabs >}} {{< tab "Before" >}}

yaml
blobs:
  - disableSSL: true

{{< /tab >}} {{< tab "After" >}}

yaml
blobs:
  - disable_ssl: true

{{< /tab >}} {{< /tabs >}}

--skip

since 2023-09-14 (v1.21), removed 2024-05-26 (v2.0)

The following goreleaser release flags were deprecated:

  • --skip-announce
  • --skip-before
  • --skip-docker
  • --skip-ko
  • --skip-publish
  • --skip-sbom
  • --skip-sign
  • --skip-validate

By the same token, the following goreleaser build flags were deprecated:

  • --skip-before
  • --skip-post-hooks
  • --skip-validate

All these flags are now under a single --skip flag, that accepts multiple values.

{{< tabs >}} {{< tab "Before" >}}

sh
goreleaser build --skip-before --skip-validate
goreleaser release --skip-validate --skip-publish

{{< /tab >}} {{< tab "After" >}}

sh
goreleaser build --skip=before,validate
goreleaser release --skip=validate,publish

# or

goreleaser build --skip=before --skip=validate
goreleaser release --skip=validate --skip=publish

{{< /tab >}} {{< /tabs >}}

You can check goreleaser build --help and goreleaser release --help to see the valid options, and shell autocompletion should work properly as well.

scoops.bucket

since 2023-06-13 (v1.19.0), removed 2024-05-26 (v2.0)

Replace bucket with repository.

{{< tabs >}} {{< tab "Before" >}}

yaml
scoops:
  - bucket:
      - name: foo
        owner: bar

{{< /tab >}} {{< tab "After" >}}

yaml
scoops:
  - repository:
      - name: foo
        owner: bar

{{< /tab >}} {{< /tabs >}}

krews.index

since 2023-06-13 (v1.19.0), removed 2024-05-26 (v2.0)

Replace index with repository.

{{< tabs >}} {{< tab "Before" >}}

yaml
krews:
  - index:
      - name: foo
        owner: bar

{{< /tab >}} {{< tab "After" >}}

yaml
krews:
  - repository:
      - name: foo
        owner: bar

{{< /tab >}} {{< /tabs >}}

brews.tap

since 2023-06-13 (v1.19.0), removed 2024-05-26 (v2.0)

Replace tap with repository.

{{< tabs >}} {{< tab "Before" >}}

yaml
brews:
  - tap:
      - name: foo
        owner: bar

{{< /tab >}} {{< tab "After" >}}

yaml
brews:
  - repository:
      - name: foo
        owner: bar

{{< /tab >}} {{< /tabs >}}

archives.rlcp

since 2023-06-06 (v1.19.0), removed 2024-05-26 (v2.0)

This option is now default and can't be changed. You can remove it from your configuration files.

source.rlcp

since 2023-06-06 (v1.19.0), removed 2024-05-26 (v2.0)

This option is now default and can't be changed. You can remove it from your configuration files.

brews.plist

since 2023-06-06 (v1.19.0), removed 2024-05-26 (v2.0)

plist is deprecated by Homebrew, and now on GoReleaser too. Use service instead.

{{< tabs >}} {{< tab "Before" >}}

yaml
brews:
  - plist: |
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
      # etc ...

{{< /tab >}} {{< tab "After" >}}

yaml
brews:
  - service: |
      run [opt_bin/"mybin"]
      keep_alive true
      # etc ...

{{< /tab >}} {{< /tabs >}}

--debug

since 2023-05-16 (v1.19.0), removed 2024-05-26 (v2.0)

--debug has been deprecated in favor of --verbose.

{{< tabs >}} {{< tab "Before" >}}

bash
goreleaser release --debug

{{< /tab >}} {{< tab "After" >}}

bash
goreleaser release --verbose

{{< /tab >}} {{< /tabs >}}

scoop

since 2023-04-30 (v1.18.0), removed 2024-05-26 (v2.0)

GoReleaser now allows many scoop configurations, so it should be pluralized accordingly.

{{< tabs >}} {{< tab "Before" >}}

yaml
scoop:
  # ...

{{< /tab >}} {{< tab "After" >}}

yaml
scoops:
  -  # ...

{{< /tab >}} {{< /tabs >}}

build

since 2023-02-09 (v1.16.0), removed 2024-05-26 (v2.0)

This option was still being supported, even though undocumented, for a couple of years now. It's finally time to sunset it.

Simply use the pluralized form, builds, according to the documentation.

{{< tabs >}} {{< tab "Before" >}}

yaml
build:
  # ...

{{< /tab >}} {{< tab "After" >}}

yaml
builds:
  -  # ...

{{< /tab >}} {{< /tabs >}}

--rm-dist

since 2023-01-17 (v1.15.0), removed 2024-05-26 (v2.0)

--rm-dist has been deprecated in favor of --clean.

{{< tabs >}} {{< tab "Before" >}}

bash
goreleaser release --rm-dist

{{< /tab >}} {{< tab "After" >}}

bash
goreleaser release --clean

{{< /tab >}} {{< /tabs >}}

nfpms.maintainer

since 2022-05-07 (v1.9.0), removed 2024-05-26 (v2.0)

nFPM will soon make mandatory setting the maintainer field.

{{< tabs >}} {{< tab "Before" >}}

yaml
nfpms:
  - maintainer: ""

{{< /tab >}} {{< tab "After" >}}

yaml
nfpms:
  - maintainer: "Name <email>"

{{< /tab >}} {{< /tabs >}}