github.com/tomsquest/goreleaser@v0.34.3-0.20171008022654-7d6ef4d338b3/docs/060-archive.md (about)

     1  ---
     2  title: Archive
     3  ---
     4  
     5  The binaries built will be archived together with the `README` and `LICENSE` files into a
     6  `tar.gz` file. In the `archive` section you can customize the archive name,
     7  additional files, and format.
     8  
     9  Here is a commented `archive` section with all fields specified:
    10  
    11  ```yml
    12  # .goreleaser.yml
    13  archive:
    14    # You can change the name of the archive.
    15    # This is parsed with the Go template engine and the following variables
    16    # are available:
    17    # - ProjectName
    18    # - Tag
    19    # - Version (Git tag without `v` prefix)
    20    # - Os
    21    # - Arch
    22    # - Arm (ARM version)
    23    # Default is `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`.
    24    name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
    25  
    26    # Set to true, if you want all files in the archive to be in a single directory.
    27    # If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz',
    28    # you get a folder 'goreleaser_Linux_arm64'.
    29    # If set to false, all files are extracted separately.
    30    # Default is false.
    31    wrap_in_directory: true
    32  
    33    # Archive format. Valid options are `tar.gz`, `zip` and `binary`.
    34    # If format is `binary`, no archives are created and the binaries are instead uploaded directly.
    35    # In that case name_template and the below specified files are ignored.
    36    # Default is `tar.gz`.
    37    format: zip
    38  
    39    # Can be used to change the archive formats for specific GOOSs.
    40    # Most common use case is to archive as zip on Windows.
    41    # Default is empty.
    42    format_overrides:
    43      - goos: windows
    44        format: zip
    45  
    46    # Replacements for GOOS and GOARCH in the archive name.
    47    # Keys should be valid GOOSs or GOARCHs.
    48    # Values are the respective replacements.
    49    # Default is empty.
    50    replacements:
    51      amd64: 64-bit
    52      386: 32-bit
    53      darwin: macOS
    54      linux: Tux
    55  
    56    # Additional files/globs you want to add to the archive.
    57    # Defaults are any files matching `LICENCE*`, `LICENSE*`,
    58    # `README*` and `CHANGELOG*` (case-insensitive).
    59    files:
    60      - LICENSE.txt
    61      - README.md
    62      - CHANGELOG.md
    63      - docs/*
    64      - design/*.png
    65  ```