github.com/droot/goreleaser@v0.66.2-0.20180420030140-c2db5fb17157/docs/123-release.md (about)

     1  ---
     2  title: Release
     3  ---
     4  
     5  GoReleaser will create a GitHub release with the current tag, upload all
     6  the artifacts and generate the changelog based on the new commits since the
     7  previous tag.
     8  
     9  Let's see what can be customized in the `release` section:
    10  
    11  ```yml
    12  # .goreleaser.yml
    13  release:
    14    # Repo in which the release will be created.
    15    # Default is extracted from the origin remote URL.
    16    github:
    17      owner: user
    18      name: repo
    19  
    20    # If set to true, will not auto-publish the release.
    21    # Default is false.
    22    draft: true
    23  
    24    # If set to true, will mark the release as not ready for production.
    25    # Default is false.
    26    prerelease: true
    27  
    28    # You can change the name of the GitHub release.
    29    # This is parsed with the Go template engine and the following variables
    30    # are available:
    31    # - ProjectName
    32    # - Tag
    33    # - Version (Git tag without `v` prefix)
    34    # There is also a template function "time" that takes a Go time format
    35    # string to insert a formated timestamp into the release name.
    36    # Default is ``
    37    name_template: "{{.ProjectName}}-v{{.Version}}"
    38  ```
    39  
    40  ## Customize the changelog
    41  
    42  You can customize how the changelog is generated using the
    43  `changelog` section in the config file:
    44  
    45  ```yaml
    46  # .goreleaser.yml
    47  changelog:
    48    filters:
    49      # commit messages matching the regexp listed here will be removed from
    50      # the changelog
    51      # Default is empty
    52      exclude:
    53        - '^docs:'
    54        - typo
    55        - (?i)foo
    56      # could either be asc, desc or empty
    57      # Default is empty
    58      sort: asc
    59  ```
    60  
    61  ## Custom release notes
    62  
    63  You can specify a file containing your custom release notes, and
    64  pass it with the `--release-notes=FILE` flag.
    65  GoReleaser will then skip its own release notes generation,
    66  using the contents of your file instead.
    67  You can use Markdown to format the contents of your file.
    68  
    69  On Unix systems you can also generate the release notes in-line by using
    70  [process substitution](https://en.wikipedia.org/wiki/Process_substitution).
    71  To list all commits since the last tag, but skip ones starting with `Merge` or
    72  `docs`, you could run this command:
    73  
    74  ```console
    75  $ goreleaser --release-notes <(some_changelog_generator)
    76  ```
    77  
    78  Some changelog generators you can use:
    79  
    80  * [buchanae/github-release-notes](https://github.com/buchanae/github-release-notes)