github.com/joselitofilho/goreleaser@v0.155.1-0.20210123221854-e4891856c593/www/docs/customization/blob.md (about) 1 --- 2 title: Blobs 3 --- 4 5 The `blobs` allows you to upload artifacts to Amazon S3, Azure Blob and 6 Google GCS. 7 8 ## Customization 9 10 ```yaml 11 # .goreleaser.yml 12 blobs: 13 # You can have multiple blob configs 14 - 15 # Template for the cloud provider name 16 # s3 for AWS S3 Storage 17 # azblob for Azure Blob Storage 18 # gs for Google Cloud Storage 19 provider: azblob 20 21 # Set a custom endpoint, useful if you're using a minio backend or 22 # other s3-compatible backends. 23 # Implies s3ForcePathStyle and requires provider to be `s3` 24 endpoint: https://minio.foo.bar 25 26 # Sets the bucket region. 27 # Requires provider to be `s3` 28 # Defaults to empty. 29 region: us-west-1 30 31 # Disables SSL 32 # Requires provider to be `s3` 33 # Defaults to false 34 disableSSL: true 35 36 # Template for the bucket name 37 bucket: goreleaser-bucket 38 39 # IDs of the artifacts you want to upload. 40 ids: 41 - foo 42 - bar 43 44 # Template for the path/name inside the bucket. 45 # Default is `{{ .ProjectName }}/{{ .Tag }}` 46 folder: "foo/bar/{{.Version}}" 47 48 # You can add extra pre-existing files to the release. 49 # The filename on the release will be the last part of the path (base). If 50 # another file with the same name exists, the latest one found will be used. 51 # Defaults to empty. 52 extra_files: 53 - glob: ./path/to/file.txt 54 - glob: ./glob/**/to/**/file/**/* 55 - glob: ./glob/foo/to/bar/file/foobar/override_from_previous 56 - 57 provider: gs 58 bucket: goreleaser-bucket 59 folder: "foo/bar/{{.Version}}" 60 - 61 provider: s3 62 bucket: goreleaser-bucket 63 folder: "foo/bar/{{.Version}}" 64 ``` 65 66 !!! tip 67 Learn more about the [name template engine](/customization/templates/). 68 69 ## Authentication 70 71 GoReleaser's blob pipe authentication varies depending upon the blob provider as mentioned below: 72 73 ### S3 Provider 74 75 S3 provider support AWS 76 [default credential provider](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials) 77 chain in the following order: 78 79 - Environment variables. 80 - Shared credentials file. 81 - If your application is running on an Amazon EC2 instance, IAM role for Amazon EC2. 82 83 ### Azure Blob Provider 84 85 Currently it supports authentication only with 86 [environment variables](https://docs.microsoft.com/en-us/azure/storage/common/storage-azure-cli#set-default-azure-storage-account-environment-variables): 87 88 - `AZURE_STORAGE_ACCOUNT` 89 - `AZURE_STORAGE_KEY` or `AZURE_STORAGE_SAS_TOKEN` 90 91 ### [GCS Provider](https://cloud.google.com/docs/authentication/production) 92 93 GCS provider uses 94 [Application Default Credentials](https://cloud.google.com/docs/authentication/production) 95 in the following order: 96 97 - Environment Variable (`GOOGLE_APPLICATION_CREDENTIALS`) 98 - Default Service Account from the compute instance (Compute Engine, 99 Kubernetes Engine, Cloud function etc). 100 101 ## ACLs 102 103 There is no common way to set ACLs across all bucket providers, so, [go-cloud][] 104 [does not support it yet][issue1108]. 105 106 You are expected to set the ACLs on the bucket/folder/etc, depending on your 107 provider. 108 109 [go-cloud]: https://gocloud.dev/howto/blob/ 110 [issue1108]: https://github.com/google/go-cloud/issues/1108