Repository: goreleaser/goreleaser
Pull request #2402 (2021-08-16 08:13:51)

chore(deps): bump code.gitea.io/sdk/gitea from 0.14.1 to 0.15.0
Bumps code.gitea.io/sdk/gitea from 0.14.1 to 0.15.0.


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=code.gitea.io/sdk/gitea&package-manager=go_modules&previous-version=0.14.1&new-version=0.15.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

vercel[bot]: This pull request is being automatically deployed with Vercel ([learn more](https://vercel.link/github-learn-more)).  
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: [https://vercel.com/goreleaser/goreleaser/TJCPn5MWgQ3GZe54KgPxtX9MdQ58](https://vercel.com/goreleaser/goreleaser/TJCPn5MWgQ3GZe54KgPxtX9MdQ58)  
✅ Preview: *In Progress*


codecov[bot]: # [Codecov](https://codecov.io/gh/goreleaser/goreleaser/pull/2402?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser) Report
> Merging [#2402](https://codecov.io/gh/goreleaser/goreleaser/pull/2402?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser) (e4c44e3) into [master](https://codecov.io/gh/goreleaser/goreleaser/commit/a4a96eab54fad2604882d4e536503ba04756ef26?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser) (a4a96ea) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/goreleaser/goreleaser/pull/2402/graphs/tree.svg?width=650&height=150&src=pr&token=3bJvv6b7hN&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser)](https://codecov.io/gh/goreleaser/goreleaser/pull/2402?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser)

```diff
@@           Coverage Diff           @@
##           master    #2402   +/-   ##
=======================================
  Coverage   82.94%   82.94%           
=======================================
  Files          83       83           
  Lines        6067     6067           
=======================================
  Hits         5032     5032           
  Misses        887      887           
  Partials      148      148           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/goreleaser/goreleaser/pull/2402?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/goreleaser/goreleaser/pull/2402?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser). Last update [a4a96ea...e4c44e3](https://codecov.io/gh/goreleaser/goreleaser/pull/2402?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser).


Patch:
diff --git a/go.mod b/go.mod
index 7a1835b3..b8a86780 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/goreleaser/goreleaser
 go 1.16
 
 require (
-	code.gitea.io/sdk/gitea v0.14.1
+	code.gitea.io/sdk/gitea v0.15.0
 	github.com/Masterminds/semver/v3 v3.1.1
 	github.com/apex/log v1.9.0
 	github.com/caarlos0/ctrlc v1.0.0
diff --git a/go.sum b/go.sum
index e0574512..1033f62d 100644
--- a/go.sum
+++ b/go.sum
@@ -44,8 +44,9 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
 cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
 cloud.google.com/go/storage v1.15.0 h1:Ljj+ZXVEhCr/1+4ZhvtteN1ND7UUsNTlduGclLh8GO0=
 cloud.google.com/go/storage v1.15.0/go.mod h1:mjjQMoxxyGH7Jr8K5qrx6N2O0AHsczI61sMNn03GIZI=
-code.gitea.io/sdk/gitea v0.14.1 h1:NaRluse+dAxVM5RmHC7Xktfas5a8WWmcnUBlJLhJycA=
-code.gitea.io/sdk/gitea v0.14.1/go.mod h1:89WiyOX1KEcvjP66sRHdu0RafojGo60bT9UqW17VbWs=
+code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE=
+code.gitea.io/sdk/gitea v0.15.0 h1:tsNhxDM/2N1Ohv1Xq5UWrht/esg0WmtRj4wsHVHriTg=
+code.gitea.io/sdk/gitea v0.15.0/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA=
 contrib.go.opencensus.io/exporter/aws v0.0.0-20200617204711-c478e41e60e9/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA=
 contrib.go.opencensus.io/exporter/stackdriver v0.13.5/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc=
 contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE=
@@ -874,6 +875,7 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK
 golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
 golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
 golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
+golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
 golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
 golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
diff --git a/internal/builders/golang/build.go b/internal/builders/golang/build.go
index 706fc9a5..604b6ebb 100644
--- a/internal/builders/golang/build.go
+++ b/internal/builders/golang/build.go
@@ -59,7 +59,7 @@ func (*Builder) WithDefaults(build config.Build) (config.Build, error) {
 		if len(build.Gomips) == 0 {
 			build.Gomips = []string{"hardfloat"}
 		}
-		targets, err := matrix(build)
+		targets, err := matrix(build, goVersion(build))
 		build.Targets = targets
 		if err != nil {
 			return build, err
diff --git a/internal/builders/golang/targets.go b/internal/builders/golang/targets.go
index bb6e533a..dd658984 100644
--- a/internal/builders/golang/targets.go
+++ b/internal/builders/golang/targets.go
@@ -1,9 +1,9 @@
 package golang
 
 import (
-	"bytes"
 	"fmt"
 	"os/exec"
+	"regexp"
 	"strings"
 
 	"github.com/apex/log"
@@ -25,7 +25,7 @@ func (t target) String() string {
 	return fmt.Sprintf("%s_%s", t.os, t.arch)
 }
 
-func matrix(build config.Build) ([]string, error) {
+func matrix(build config.Build, version []byte) ([]string, error) {
 	// nolint:prealloc
 	var targets []target
 	// nolint:prealloc
@@ -43,13 +43,20 @@ func matrix(build config.Build) ([]string, error) {
 		if target.mips != "" && !contains(target.mips, validGomips) {
 			return result, fmt.Errorf("invalid gomips: %s", target.mips)
 		}
-		if target.os == "darwin" && target.arch == "arm64" && !isGo116(build) {
+		if target.os == "darwin" && target.arch == "arm64" && !go116re.Match(version) {
 			log.Warn(color.New(color.Bold, color.FgHiYellow).Sprintf(
 				"DEPRECATED: skipped darwin/arm64 build on Go < 1.16 for compatibility, check %s for more info.",
 				"https://goreleaser.com/deprecations/#builds-for-darwinarm64",
 			))
 			continue
 		}
+		if target.os == "windows" && target.arch == "arm64" && !go117re.Match(version) {
+			log.Warn(color.New(color.Bold, color.FgHiYellow).Sprintf(
+				"DEPRECATED: skipped windows/arm64 build on Go < 1.17 for compatibility, check %s for more info.",
+				"https://goreleaser.com/deprecations/#builds-for-windowsarm64",
+			))
+			continue
+		}
 		if !valid(target) {
 			log.WithField("target", target).Debug("skipped invalid build")
 			continue
@@ -119,9 +126,14 @@ func ignored(build config.Build, target target) bool {
 	return false
 }
 
-func isGo116(build config.Build) bool {
+var (
+	go116re = regexp.MustCompile(`go version go1.1[6-9]`)
+	go117re = regexp.MustCompile(`go version go1.1[7-9]`)
+)
+
+func goVersion(build config.Build) []byte {
 	bts, _ := exec.Command(build.GoBinary, "version").CombinedOutput()
-	return bytes.Contains(bts, []byte("go version go1.16"))
+	return bts
 }
 
 func valid(target target) bool {
@@ -179,6 +191,7 @@ var (
 		"plan9arm",
 		"solarisamd64",
 		"windowsarm",
+		"windowsarm64",
 		"windows386",
 		"windowsamd64",
 	}
diff --git a/internal/exec/exec.go b/internal/exec/exec.go
index 1e8e0560..85e8c1c6 100644
--- a/internal/exec/exec.go
+++ b/internal/exec/exec.go
@@ -105,6 +105,8 @@ func filterArtifacts(artifacts artifact.Artifacts, publisher config.Publisher) [
 		artifact.ByType(artifact.UploadableFile),
 		artifact.ByType(artifact.LinuxPackage),
 		artifact.ByType(artifact.UploadableBinary),
+		artifact.ByType(artifact.DockerImage),
+		artifact.ByType(artifact.DockerManifest),
 	}
 
 	if publisher.Checksum {
diff --git a/internal/pipe/docker/docker.go b/internal/pipe/docker/docker.go
index 0a218340..e031ed37 100644
--- a/internal/pipe/docker/docker.go
+++ b/internal/pipe/docker/docker.go
@@ -13,6 +13,7 @@ import (
 	"github.com/goreleaser/goreleaser/internal/artifact"
 	"github.com/goreleaser/goreleaser/internal/deprecate"
 	"github.com/goreleaser/goreleaser/internal/gio"
+	"github.com/goreleaser/goreleaser/internal/ids"
 	"github.com/goreleaser/goreleaser/internal/pipe"
 	"github.com/goreleaser/goreleaser/internal/semerrgroup"
 	"github.com/goreleaser/goreleaser/internal/tmpl"
@@ -36,9 +37,13 @@ func (Pipe) String() string {
 
 // Default sets the pipe defaults.
 func (Pipe) Default(ctx *context.Context) error {
+	ids := ids.New("dockers")
 	for i := range ctx.Config.Dockers {
 		docker := &ctx.Config.Dockers[i]
 
+		if docker.ID != "" {
+			ids.Inc(docker.ID)
+		}
 		if docker.Goos == "" {
 			docker.Goos = "linux"
 		}
@@ -48,13 +53,6 @@ func (Pipe) Default(ctx *context.Context) error {
 		if docker.Dockerfile == "" {
 			docker.Dockerfile = "Dockerfile"
 		}
-		if len(docker.Binaries) > 0 {
-			deprecate.Notice(ctx, "docker.binaries")
-		}
-		if len(docker.Builds) > 0 {
-			deprecate.Notice(ctx, "docker.builds")
-			docker.IDs = append(docker.IDs, docker.Builds...)
-		}
 		if docker.Buildx {
 			deprecate.Notice(ctx, "docker.use_buildx")
 			if docker.Use == "" {
@@ -73,7 +71,7 @@ func (Pipe) Default(ctx *context.Context) error {
 			}
 		}
 	}
-	return nil
+	return ids.Validate()
 }
 
 func validateImager(use string) error {
@@ -245,13 +243,18 @@ func dockerPush(ctx *context.Context, image *artifact.Artifact) error {
 	if err := imagers[docker.Use].Push(ctx, image.Name, docker.PushFlags); err != nil {
 		return err
 	}
-	ctx.Artifacts.Add(&artifact.Artifact{
+	art := &artifact.Artifact{
 		Type:   artifact.DockerImage,
 		Name:   image.Name,
 		Path:   image.Path,
 		Goarch: image.Goarch,
 		Goos:   image.Goos,
 		Goarm:  image.Goarm,
-	})
+		Extra:  map[string]interface{}{},
+	}
+	if docker.ID != "" {
+		art.Extra["ID"] = docker.ID
+	}
+	ctx.Artifacts.Add(art)
 	return nil
 }
diff --git a/internal/pipe/docker/manifest.go b/internal/pipe/docker/manifest.go
index 02b24613..40af5697 100644
--- a/internal/pipe/docker/manifest.go
+++ b/internal/pipe/docker/manifest.go
@@ -7,6 +7,7 @@ import (
 
 	"github.com/apex/log"
 	"github.com/goreleaser/goreleaser/internal/artifact"
+	"github.com/goreleaser/goreleaser/internal/ids"
 	"github.com/goreleaser/goreleaser/internal/pipe"
 	"github.com/goreleaser/goreleaser/internal/semerrgroup"
 	"github.com/goreleaser/goreleaser/internal/tmpl"
@@ -24,8 +25,12 @@ func (ManifestPipe) String() string {
 
 // Default sets the pipe defaults.
 func (ManifestPipe) Default(ctx *context.Context) error {
+	ids := ids.New("docker_manifests")
 	for i := range ctx.Config.DockerManifests {
 		manifest := &ctx.Config.DockerManifests[i]
+		if manifest.ID != "" {
+			ids.Inc(manifest.ID)
+		}
 		if manifest.Use == "" {
 			manifest.Use = useDocker
 		}
@@ -33,7 +38,7 @@ func (ManifestPipe) Default(ctx *context.Context) error {
 			return err
 		}
 	}
-	return nil
+	return ids.Validate()
 }
 
 // Publish the docker manifests.
@@ -69,11 +74,16 @@ func (ManifestPipe) Publish(ctx *context.Context) error {
 			if err := manifester.Create(ctx, name, images, manifest.CreateFlags); err != nil {
 				return err
 			}
-			ctx.Artifacts.Add(&artifact.Artifact{
-				Type: artifact.DockerManifest,
-				Name: name,
-				Path: name,
-			})
+			art := &artifact.Artifact{
+				Type:  artifact.DockerManifest,
+				Name:  name,
+				Path:  name,
+				Extra: map[string]interface{}{},
+			}
+			if manifest.ID != "" {
+				art.Extra["ID"] = manifest.ID
+			}
+			ctx.Artifacts.Add(art)
 
 			log.WithField("manifest", name).Info("pushing docker manifest")
 			return manifester.Push(ctx, name, manifest.PushFlags)
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 0ad1a015..49afa62c 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -541,8 +541,7 @@ type Checksum struct {
 
 // Docker image config.
 type Docker struct {
-	Binaries           []string `yaml:",omitempty"` // deprecated: no need to use this anymore
-	Builds             []string `yaml:",omitempty"` // deprecated: use IDs instead
+	ID                 string   `yaml:"id,omitempty"`
 	IDs                []string `yaml:"ids,omitempty"`
 	Goos               string   `yaml:",omitempty"`
 	Goarch             string   `yaml:",omitempty"`
@@ -559,6 +558,7 @@ type Docker struct {
 
 // DockerManifest config.
 type DockerManifest struct {
+	ID             string   `yaml:"id,omitempty"`
 	NameTemplate   string   `yaml:"name_template,omitempty"`
 	SkipPush       string   `yaml:"skip_push,omitempty"`
 	ImageTemplates []string `yaml:"image_templates,omitempty"`
diff --git a/www/docs/customization/docker.md b/www/docs/customization/docker.md
index f0ddd26c..6ac14c08 100644
--- a/www/docs/customization/docker.md
+++ b/www/docs/customization/docker.md
@@ -48,6 +48,9 @@ Of course, you can customize a lot of things:
 dockers:
   # You can have multiple Docker images.
   -
+    # ID of the image, needed if you want to filter by it later on (e.g. on custom publishers).
+    id: myimg
+
     # GOOS of the built binaries/packages that should be used.
     goos: linux
 
diff --git a/www/docs/customization/docker_manifest.md b/www/docs/customization/docker_manifest.md
index 2a0f7d88..d25e1894 100644
--- a/www/docs/customization/docker_manifest.md
+++ b/www/docs/customization/docker_manifest.md
@@ -28,6 +28,9 @@ options available:
 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 custom publishers).
+  id: myimg
+
   # Name template for the manifest.
   # Defaults to empty.
   name_template: foo/bar:{{ .Version }}
diff --git a/www/docs/deprecations.md b/www/docs/deprecations.md
index 5cc25665..318531c3 100644
--- a/www/docs/deprecations.md
+++ b/www/docs/deprecations.md
@@ -38,6 +38,25 @@ Description.
 
 -->
 
+### builds for windows/arm64
+
+> since 2021-08-16 (v0.175.0)
+
+Since Go 1.17, `windows/arm64` is a valid target.
+
+Prior to v0.175.0, GoReleaser would just ignore this target.
+Since in Go 1.17 it is now a valid target, GoReleaser will build it if the Go version being used is 1.17 or later.
+
+If you want to make sure it is ignored in the future, you need to add this to your build config:
+
+```yaml
+ignore:
+- goos: windows
+  goarch: arm64
+```
+
+If you try to use new versions of GoReleaser with Go 1.16 or older, it will warn about it until this deprecation warning expires, after that your build will likely fail.
+
 ### docker.use_buildx
 
 > since 2021-06-26 (v0.172.0)
@@ -76,8 +95,8 @@ Because of that, once this deprecation expires, GoReleaser will hard fail on non
 
 Since Go 1.16, `darwin/arm64` is macOS on Apple Silicon instead of `iOS`.
 
-Prior to v0.156.0, GoReleaser would just ignore this target, but since in Go 1.16 it is a valid target, GoReleaser will
-now build it if the Go version being used is 1.16.
+Prior to v0.156.0, GoReleaser would just ignore this target.
+Since in Go 1.16 and later it is a valid target, GoReleaser will now build it if the Go version being used is 1.16 or later.
 
 If you want to make sure it is ignored in the future, you need to add this to your build config:
 
@@ -87,11 +106,15 @@ ignore:
   goarch: arm64
 ```
 
-If you try to use new versions of GoReleaser with Go 1.15, it will warn about it until this deprecation warning expires.
+If you try to use new versions of GoReleaser with Go 1.15 or older, it will warn about it until this deprecation warning expires, after that your build will likely fail.
+
+## Expired deprecation notices
+
+The following options were deprecated in the past and were already removed.
 
 ### docker.builds
 
-> since 2021-01-07 (v0.154.0)
+> since 2021-01-07 (v0.154.0), removed 2021-08-13 (v0.175.0)
 
 `builds` is deprecated in favor of `ids`, since now it also allows to copy nfpm packages:
 
@@ -113,7 +136,7 @@ Change this:
 
 ### docker.binaries
 
-> since 2021-01-07 (v0.154.0)
+> since 2021-01-07 (v0.154.0), removed 2021-08-13 (v0.175.0)
 
 `binaries` is deprecated and now does nothing.
 If you want to filter something out, use the `ids` property.
@@ -134,13 +157,9 @@ Change this:
         ids: ['foo']
     ```
 
-## Expired deprecation notices
-
-The following options were deprecated in the past and were already removed.
-
 ### nfpms.files
 
-> since 2020-12-21 (v0.149.0)
+> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)
 
 `files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):
 
@@ -165,7 +184,7 @@ Change this:
 
 ### nfpms.config_files
 
-> since 2020-12-21 (v0.149.0)
+> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)
 
 `config_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):
 
@@ -191,7 +210,7 @@ Change this:
 
 ### nfpms.symlinks
 
-> since 2020-12-21 (v0.149.0)
+> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)
 
 `symlinks` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):
 
@@ -217,7 +236,7 @@ Change this:
 
 ### nfpms.rpm.ghost_files
 
-> since 2020-12-21 (v0.149.0)
+> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)
 
 `rpm.ghost_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):
 
@@ -244,7 +263,7 @@ Change this:
 
 ### nfpms.rpm.config_noreplace_files
 
-> since 2020-12-21 (v0.149.0)
+> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)
 
 `rpm.config_noreplace_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):
 
@@ -273,7 +292,7 @@ Change this:
 
 ### nfpms.deb.version_metadata
 
-> since 2020-12-21 (v0.149.0)
+> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)
 
 `deb.version_metadata` is deprecated in favor of `version_metadata` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):
 


Test patch:
diff --git a/internal/builders/golang/targets_test.go b/internal/builders/golang/targets_test.go
index b2af7e5e..c518b366 100644
--- a/internal/builders/golang/targets_test.go
+++ b/internal/builders/golang/targets_test.go
@@ -56,36 +56,105 @@ func TestAllBuildTargets(t *testing.T) {
 			},
 		},
 	}
-	result, err := matrix(build)
-	require.NoError(t, err)
-	require.Equal(t, []string{
-		"linux_386",
-		"linux_amd64",
-		"linux_arm_6",
-		"linux_arm64",
-		"linux_mips_hardfloat",
-		"linux_mips_softfloat",
-		"linux_mips64_softfloat",
-		"linux_mipsle_hardfloat",
-		"linux_mipsle_softfloat",
-		"linux_mips64le_hardfloat",
-		"linux_riscv64",
-		"darwin_amd64",
-		"darwin_arm64",
-		"freebsd_386",
-		"freebsd_amd64",
-		"freebsd_arm_6",
-		"freebsd_arm_7",
-		"freebsd_arm64",
-		"openbsd_386",
-		"openbsd_amd64",
-		"openbsd_arm64",
-		"windows_386",
-		"windows_amd64",
-		"windows_arm_6",
-		"windows_arm_7",
-		"js_wasm",
-	}, result)
+
+	t.Run("go 1.15", func(t *testing.T) {
+		result, err := matrix(build, []byte("go version go1.15.0"))
+		require.NoError(t, err)
+		require.Equal(t, []string{
+			"linux_386",
+			"linux_amd64",
+			"linux_arm_6",
+			"linux_arm64",
+			"linux_mips_hardfloat",
+			"linux_mips_softfloat",
+			"linux_mips64_softfloat",
+			"linux_mipsle_hardfloat",
+			"linux_mipsle_softfloat",
+			"linux_mips64le_hardfloat",
+			"linux_riscv64",
+			"darwin_amd64",
+			"freebsd_386",
+			"freebsd_amd64",
+			"freebsd_arm_6",
+			"freebsd_arm_7",
+			"freebsd_arm64",
+			"openbsd_386",
+			"openbsd_amd64",
+			"openbsd_arm64",
+			"windows_386",
+			"windows_amd64",
+			"windows_arm_6",
+			"windows_arm_7",
+			"js_wasm",
+		}, result)
+	})
+
+	t.Run("go 1.16", func(t *testing.T) {
+		result, err := matrix(build, []byte("go version go1.16.2"))
+		require.NoError(t, err)
+		require.Equal(t, []string{
+			"linux_386",
+			"linux_amd64",
+			"linux_arm_6",
+			"linux_arm64",
+			"linux_mips_hardfloat",
+			"linux_mips_softfloat",
+			"linux_mips64_softfloat",
+			"linux_mipsle_hardfloat",
+			"linux_mipsle_softfloat",
+			"linux_mips64le_hardfloat",
+			"linux_riscv64",
+			"darwin_amd64",
+			"darwin_arm64",
+			"freebsd_386",
+			"freebsd_amd64",
+			"freebsd_arm_6",
+			"freebsd_arm_7",
+			"freebsd_arm64",
+			"openbsd_386",
+			"openbsd_amd64",
+			"openbsd_arm64",
+			"windows_386",
+			"windows_amd64",
+			"windows_arm_6",
+			"windows_arm_7",
+			"js_wasm",
+		}, result)
+	})
+
+	t.Run("go 1.17", func(t *testing.T) {
+		result, err := matrix(build, []byte("go version go1.17.0"))
+		require.NoError(t, err)
+		require.Equal(t, []string{
+			"linux_386",
+			"linux_amd64",
+			"linux_arm_6",
+			"linux_arm64",
+			"linux_mips_hardfloat",
+			"linux_mips_softfloat",
+			"linux_mips64_softfloat",
+			"linux_mipsle_hardfloat",
+			"linux_mipsle_softfloat",
+			"linux_mips64le_hardfloat",
+			"linux_riscv64",
+			"darwin_amd64",
+			"darwin_arm64",
+			"freebsd_386",
+			"freebsd_amd64",
+			"freebsd_arm_6",
+			"freebsd_arm_7",
+			"freebsd_arm64",
+			"openbsd_386",
+			"openbsd_amd64",
+			"openbsd_arm64",
+			"windows_386",
+			"windows_amd64",
+			"windows_arm_6",
+			"windows_arm_7",
+			"windows_arm64",
+			"js_wasm",
+		}, result)
+	})
 }
 
 func TestGoosGoarchCombos(t *testing.T) {
@@ -132,11 +201,11 @@ func TestGoosGoarchCombos(t *testing.T) {
 		{"windows", "386", true},
 		{"windows", "amd64", true},
 		{"windows", "arm", true},
+		{"windows", "arm64", true},
 		{"js", "wasm", true},
 		// invalid targets
 		{"darwin", "386", false},
 		{"darwin", "arm", false},
-		{"windows", "arm64", false},
 		{"windows", "riscv64", false},
 	}
 	for _, p := range platforms {
diff --git a/internal/exec/exec_test.go b/internal/exec/exec_test.go
index 9e0c4e73..7d094667 100644
--- a/internal/exec/exec_test.go
+++ b/internal/exec/exec_test.go
@@ -35,7 +35,6 @@ func TestExecute(t *testing.T) {
 		ext string
 		typ artifact.Type
 	}{
-		{"docker", "---", artifact.DockerImage},
 		{"debpkg", "deb", artifact.LinuxPackage},
 		{"binary", "bin", artifact.Binary},
 		{"archive", "tar", artifact.UploadableArchive},
@@ -57,6 +56,25 @@ func TestExecute(t *testing.T) {
 		})
 	}
 
+	ctx.Artifacts.Add(&artifact.Artifact{
+		Name:   "foo/bar:amd64",
+		Goos:   "linux",
+		Goarch: "amd64",
+		Path:   "foo/bar:amd64",
+		Type:   artifact.DockerImage,
+		Extra: map[string]interface{}{
+			"ID": "img",
+		},
+	})
+	ctx.Artifacts.Add(&artifact.Artifact{
+		Name: "foo/bar",
+		Path: "foo/bar",
+		Type: artifact.DockerManifest,
+		Extra: map[string]interface{}{
+			"ID": "mnf",
+		},
+	})
+
 	osEnv := func(ignores ...string) []string {
 		var result []string
 	outer:
@@ -108,6 +126,8 @@ func TestExecute(t *testing.T) {
 								{ExpectedArgs: []string{"a.deb"}, ExitCode: 0, ExpectedEnv: osEnv()},
 								{ExpectedArgs: []string{"a.ubi"}, ExitCode: 0, ExpectedEnv: osEnv()},
 								{ExpectedArgs: []string{"a.tar"}, ExitCode: 0, ExpectedEnv: osEnv()},
+								{ExpectedArgs: []string{"foo/bar"}, ExitCode: 0, ExpectedEnv: osEnv()},
+								{ExpectedArgs: []string{"foo/bar:amd64"}, ExitCode: 0, ExpectedEnv: osEnv()},
 							},
 						}),
 					},
@@ -129,6 +149,8 @@ func TestExecute(t *testing.T) {
 								{ExpectedArgs: []string{"a.ubi"}, ExitCode: 0, ExpectedEnv: osEnv()},
 								{ExpectedArgs: []string{"a.tar"}, ExitCode: 0, ExpectedEnv: osEnv()},
 								{ExpectedArgs: []string{"a.sum"}, ExitCode: 0, ExpectedEnv: osEnv()},
+								{ExpectedArgs: []string{"foo/bar"}, ExitCode: 0, ExpectedEnv: osEnv()},
+								{ExpectedArgs: []string{"foo/bar:amd64"}, ExitCode: 0, ExpectedEnv: osEnv()},
 							},
 						}),
 					},
@@ -150,6 +172,27 @@ func TestExecute(t *testing.T) {
 								{ExpectedArgs: []string{"a.ubi"}, ExitCode: 0, ExpectedEnv: osEnv()},
 								{ExpectedArgs: []string{"a.tar"}, ExitCode: 0, ExpectedEnv: osEnv()},
 								{ExpectedArgs: []string{"a.sig"}, ExitCode: 0, ExpectedEnv: osEnv()},
+								{ExpectedArgs: []string{"foo/bar"}, ExitCode: 0, ExpectedEnv: osEnv()},
+								{ExpectedArgs: []string{"foo/bar:amd64"}, ExitCode: 0, ExpectedEnv: osEnv()},
+							},
+						}),
+					},
+				},
+			},
+			nil,
+		},
+		{
+			"docker",
+			[]config.Publisher{
+				{
+					Name: "test",
+					IDs:  []string{"img", "mnf"},
+					Cmd:  MockCmd + " {{ .ArtifactName }}",
+					Env: []string{
+						MarshalMockEnv(&MockData{
+							AnyOf: []MockCall{
+								{ExpectedArgs: []string{"foo/bar"}, ExitCode: 0, ExpectedEnv: osEnv()},
+								{ExpectedArgs: []string{"foo/bar:amd64"}, ExitCode: 0, ExpectedEnv: osEnv()},
 							},
 						}),
 					},
diff --git a/internal/pipe/docker/docker_test.go b/internal/pipe/docker/docker_test.go
index 0e3bd842..148454fd 100644
--- a/internal/pipe/docker/docker_test.go
+++ b/internal/pipe/docker/docker_test.go
@@ -1106,9 +1106,7 @@ func TestDefault(t *testing.T) {
 		Config: config.Project{
 			Dockers: []config.Docker{
 				{
-					IDs:      []string{"aa"},
-					Builds:   []string{"foo"},
-					Binaries: []string{"aaa"},
+					IDs: []string{"aa"},
 				},
 				{
 					Use: useBuildx,
@@ -1127,7 +1125,7 @@ func TestDefault(t *testing.T) {
 	docker := ctx.Config.Dockers[0]
 	require.Equal(t, "linux", docker.Goos)
 	require.Equal(t, "amd64", docker.Goarch)
-	require.Equal(t, []string{"aa", "foo"}, docker.IDs)
+	require.Equal(t, []string{"aa"}, docker.IDs)
 	require.Equal(t, useDocker, docker.Use)
 	docker = ctx.Config.Dockers[1]
 	require.Equal(t, useBuildx, docker.Use)
@@ -1138,6 +1136,27 @@ func TestDefault(t *testing.T) {
 	require.Equal(t, useDocker, ctx.Config.DockerManifests[1].Use)
 }
 
+func TestDefaultDuplicateID(t *testing.T) {
+	ctx := &context.Context{
+		Config: config.Project{
+			Dockers: []config.Docker{
+				{ID: "foo"},
+				{ /* empty */ },
+				{ID: "bar"},
+				{ID: "foo"},
+			},
+			DockerManifests: []config.DockerManifest{
+				{ID: "bar"},
+				{ /* empty */ },
+				{ID: "bar"},
+				{ID: "foo"},
+			},
+		},
+	}
+	require.EqualError(t, Pipe{}.Default(ctx), "found 2 dockers with the ID 'foo', please fix your config")
+	require.EqualError(t, ManifestPipe{}.Default(ctx), "found 2 docker_manifests with the ID 'bar', please fix your config")
+}
+
 func TestDefaultInvalidUse(t *testing.T) {
 	ctx := &context.Context{
 		Config: config.Project{