cmd/release: do not set ACLs on objects when uploading

This change removes the explicit setting of files uploaded during the
release process. The bucket where the files are being uploaded to now
use uniform bucket-level access which defines an ACL for all objects
in the bucket. Any attempt to set an ACL will end with a failure.

Fixes golang/go#46028

Change-Id: If2b291a4b5ee94b75cf73113f3afe8b65a002cf5
Reviewed-on: https://go-review.googlesource.com/c/build/+/317809
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/cmd/release/upload.go b/cmd/release/upload.go
index 83300cf..2f0189c 100644
--- a/cmd/release/upload.go
+++ b/cmd/release/upload.go
@@ -30,19 +30,9 @@
 
 const (
 	uploadURL     = "https://golang.org/dl/upload"
-	projectID     = "999119582588"
 	storageBucket = "golang"
 )
 
-var publicACL = []storage.ACLRule{
-	{Entity: storage.AllUsers, Role: storage.RoleReader},
-	// If you don't give the owners access, the web UI seems to
-	// have a bug and doesn't have access to see that it's public,
-	// so won't render the "Shared Publicly" link. So we do that,
-	// even though it's dumb and unnecessary otherwise:
-	{Entity: storage.ACLEntity("project-owners-" + projectID), Role: storage.RoleOwner},
-}
-
 // File represents a file on the golang.org downloads page.
 // It should be kept in sync with the download code in x/tools/godoc/dl.
 type File struct {
@@ -210,7 +200,6 @@
 
 func putObject(ctx context.Context, c *storage.Client, name string, body []byte) error {
 	wr := c.Bucket(storageBucket).Object(name).NewWriter(ctx)
-	wr.ACL = publicACL
 	if _, err := wr.Write(body); err != nil {
 		return err
 	}
@@ -303,7 +292,6 @@
 		return "", -1, fmt.Errorf("could not get sha256: %v", err)
 	}
 	copier := dst.CopierFrom(src)
-	copier.ACL = publicACL
 	attrs, err := copier.Run(ctx)
 	if err != nil {
 		return "", -1, err