github.com/fitzix/goreleaser@v0.92.0/www/content/s3.md (about)

     1  ---
     2  title: S3
     3  series: customization
     4  hideFromIndex: true
     5  weight: 115
     6  ---
     7  
     8  Since [v0.74.0](https://github.com/goreleaser/goreleaser/releases/tag/v0.74.0),
     9  GoReleaser supports pushing artifacts to Amazon S3 and other API-compatible
    10  block storages ([minio][] for example).
    11  
    12  [minio]: https://www.minio.io
    13  
    14  Right now, the implementation is quite simple and probably won't cover all
    15  use cases. If you need one of such use cases, please open an issue/pull request.
    16  
    17  ## Customization
    18  
    19  ```yaml
    20  # .goreleaser.yml
    21  s3:
    22    # You can have multiple s3 configs
    23    -
    24      # Bucket name (without the s3:// prefix)
    25      # Default is empty.
    26      bucket: my-bucket
    27      # AWS Region to use.
    28      # Defaults is us-east-1
    29      region: us-east-1
    30      # Template for the path/name inside the bucket.
    31      # Default is `{{ .ProjectName }}/{{ .Tag }}`
    32      folder: "foo/bar/{{.Version}}"
    33      # Set a custom profile to use for this s3 config. If you have multiple
    34      # profiles setup in you ~/.aws config, this shall help defining which
    35      # profile to use in which s3 bucket.
    36      # Default is empty.
    37      profile: my-profile
    38      # Endpoint allows you to set a custom endpoint, which is useful if you
    39      # want to push your artifacts to a minio server for example.
    40      # Default is AWS S3 URL.
    41      endpoint: "http://minio.foo.com"
    42      # Sets the ACL of the object using the specified canned ACL.
    43      # Default is private.
    44      acl: public-read
    45  ```
    46  
    47  > Learn more about the [name template engine](/templates).
    48  > Learn more about the [acl](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html).
    49  
    50  ## Authentication
    51  
    52  GoReleaser will authenticate using the [same methods defined by aws-cli][auth].
    53  You can read the [docs][auth] to find out more about it.
    54  
    55  Currently it supports authentication with:
    56  
    57  * A [EnvProvider][EnvProvider] which retrieves credentials from the environment variables of the
    58    running process. Environment credentials never expire.
    59    Environment variables used:
    60    
    61    * Access Key ID:     AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY
    62  
    63    * Secret Access Key: AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY
    64    
    65  * A [SharedCredentialsProvider][SharedCredentialsProvider] which retrieves credentials from the current user's home
    66    directory, and keeps track if those credentials are expired.
    67    
    68    Profile ini file example: $HOME/.aws/credentials
    69    
    70  * A AssumeRoleTokenProvider with enabled SharedConfigState which uses MFA prompting for token code on stdin.
    71    Go to [session doc][session] for more details.
    72  
    73  You can also set different profile names for each S3 config, so you may be able
    74  to push to buckets in different accounts, for example.
    75  
    76  [auth]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
    77  [envProvider]: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials/#EnvProvider
    78  [sharedCredentialsProvider]: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials/#SharedCredentialsProvider
    79  [session]: https://docs.aws.amazon.com/sdk-for-go/api/aws/session/