1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/www/content/release.md

84 lines
2.1 KiB
Markdown
Raw Normal View History

2017-09-10 22:07:28 +02:00
---
2018-02-19 01:37:59 +02:00
title: Release
series: customization
hideFromIndex: true
weight: 110
2017-09-10 22:07:28 +02:00
---
2018-02-19 01:37:59 +02:00
GoReleaser will create a GitHub release with the current tag, upload all
the artifacts and generate the changelog based on the new commits since the
previous tag.
2017-09-10 22:07:28 +02:00
Let's see what can be customized in the `release` section:
```yml
# .goreleaser.yml
release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL.
github:
owner: user
name: repo
# If set to true, will not auto-publish the release.
# Default is false.
2017-09-10 22:07:28 +02:00
draft: true
# If set to true, will mark the release as not ready for production.
# Default is false.
prerelease: true
2017-10-16 21:18:53 +02:00
# You can change the name of the GitHub release.
# Default is ``
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"
2018-04-25 05:37:11 +02:00
# You can disable this pipe in order to not upload any artifacts to
# GitHub.
# Defaults to false.
disable: true
2017-09-10 22:07:28 +02:00
```
2018-07-09 08:57:46 +02:00
> Learn more about the [name template engine](/templates).
## Customize the changelog
You can customize how the changelog is generated using the
`changelog` section in the config file:
```yaml
# .goreleaser.yml
changelog:
2018-09-11 18:34:59 +02:00
# could either be asc, desc or empty
# Default is empty
sort: asc
filters:
# commit messages matching the regexp listed here will be removed from
# the changelog
2017-12-20 12:32:21 +02:00
# Default is empty
exclude:
- '^docs:'
- typo
- (?i)foo
```
2017-09-10 22:07:28 +02:00
## Custom release notes
You can specify a file containing your custom release notes, and
pass it with the `--release-notes=FILE` flag.
2017-09-10 22:07:28 +02:00
GoReleaser will then skip its own release notes generation,
using the contents of your file instead.
You can use Markdown to format the contents of your file.
On Unix systems you can also generate the release notes in-line by using
[process substitution](https://en.wikipedia.org/wiki/Process_substitution).
To list all commits since the last tag, but skip ones starting with `Merge` or
`docs`, you could run this command:
2018-02-19 01:37:59 +02:00
```console
$ goreleaser --release-notes <(some_changelog_generator)
```
Some changelog generators you can use:
- [buchanae/github-release-notes](https://github.com/buchanae/github-release-notes)