1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/docs/115-release.md
Jorin Vogel 6fb21be33c
docs: Add example for --release-notes flag
I added an example to the docs of the `--release-notes` flag to make the usage more clear (see #284).
The example is an realistic use case and might help others to generate their own changelog.
2017-09-30 22:37:11 +02:00

1.2 KiB

title
Custom releasing

GoRelease will create a release in GitHub with the current tag, upload all the archives and checksums, also generating a changelog from the commit log between the current and previous tags.

Let's see what can be customized in the release section:

# .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
  draft: true

Custom release notes

You can have a markdown file previously created with the release notes, and pass it down to goreleaser with the --release-notes=FILE flag. GoReleaser will then skip its own release notes generation, using the contents of your file instead.

On Unix systems you can also generate the release notes in-line by using process substitution. To list all commits since the last tag, but skip ones starting with Merge or docs, you could run this command:

goreleaser --release-notes <(git log --pretty=oneline --abbrev-commit $(git describe --tags --abbrev=0)^.. | grep -v '^[^ ]* \(Merge\|docs\)')