github.com/goreleaser/goreleaser@v1.25.1/www/docs/customization/changelog.md (about) 1 # Changelog 2 3 You can customize how the changelog is generated using the `changelog` section in the config file: 4 5 ```yaml 6 # .goreleaser.yml 7 changelog: 8 # Set this to true if you don't want any changelog at all. 9 # 10 # Warning: this will also ignore any changelog files passed via `--release-notes`, 11 # and will render an empty changelog. 12 # 13 # This may result in an empty release notes on GitHub/GitLab/Gitea. 14 # 15 # Templates: allowed 16 disable: "{{ .Env.CREATE_CHANGELOG }}" 17 18 # Changelog generation implementation to use. 19 # 20 # Valid options are: 21 # - `git`: uses `git log`; 22 # - `github`: uses the compare GitHub API, appending the author login to the changelog. 23 # - `gitlab`: uses the compare GitLab API, appending the author name and email to the changelog. 24 # - `github-native`: uses the GitHub release notes generation API, disables the groups feature. 25 # 26 # Default: 'git' 27 use: github 28 29 # Sorts the changelog by the commit's messages. 30 # Could either be asc, desc or empty 31 # Empty means 'no sorting', it'll use the output of `git log` as is. 32 sort: asc 33 34 # Max commit hash length to use in the changelog. 35 # 36 # 0: use whatever the changelog implementation gives you 37 # -1: remove the commit hash from the changelog 38 # any other number: max length. 39 # 40 # Since: v1.11.2 41 abbrev: -1 42 43 # Paths to filter the commits for. 44 # Only works when `use: git`, otherwise ignored. 45 # 46 # Default: monorepo.dir value, or empty if no monorepo 47 # This feature is only available in GoReleaser Pro. 48 # Since: v1.12 (pro) 49 paths: 50 - foo/ 51 - bar/ 52 53 # Group commits messages by given regex and title. 54 # Order value defines the order of the groups. 55 # Providing no regex means all commits will be grouped under the default group. 56 # 57 # Matches are performed against the first line of the commit message only, 58 # prefixed with the commit SHA1, usually in the form of 59 # `<abbrev-commit>[:] <title-commit>`. 60 # Groups are disabled when using github-native, as it already groups things by itself. 61 # Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax. 62 groups: 63 - title: Features 64 regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' 65 order: 0 66 - title: "Bug fixes" 67 regexp: '^.*?bug(\([[:word:]]+\))??!?:.+$' 68 order: 1 69 - title: Others 70 order: 999 71 72 # A group can have subgroups. 73 # If you use this, all the commits that match the parent group will also 74 # be checked against its subgroups. If some of them matches, it'll be 75 # grouped there, otherwise they'll remain not grouped. 76 # 77 # The title is optional - you can think of groups as a way to order 78 # commits within a group. 79 # 80 # There can only be one level of subgroups, i.e.: a subgroup can't have 81 # subgroups within it. 82 # 83 # This feature is only available in GoReleaser Pro. 84 # Since: v1.15 (pro) 85 groups: 86 - title: "Docs" 87 regex: ".*docs.*" 88 order: 1 89 - title: "CI" 90 regex: ".*build.*" 91 order: 2 92 93 # Divider to use between groups. 94 # 95 # This feature is only available in GoReleaser Pro. 96 # Since: v1.16 (pro) 97 divider: "---" 98 99 filters: 100 # Commit messages matching the regexp listed here will be removed from 101 # the changelog 102 # 103 # Matches are performed against the first line of the commit message only, 104 # prefixed with the commit SHA1, usually in the form of 105 # `<abbrev-commit>[:] <title-commit>`. 106 exclude: 107 - "^docs:" 108 - typo 109 - (?i)foo 110 111 # Commit messages matching the regexp listed here will be the only ones 112 # added to the changelog 113 # 114 # If include is not-empty, exclude will be ignored. 115 # 116 # Matches are performed against the first line of the commit message only, 117 # prefixed with the commit SHA1, usually in the form of 118 # `<abbrev-commit>[:] <title-commit>`. 119 # 120 # Since: v1.19 121 include: 122 - "^feat:" 123 ``` 124 125 !!! warning 126 127 Some things to keep an eye on: 128 129 * The `github-native` changelog does not support `sort` and `filter`. 130 * When releasing a [nightly][], `use` will fallback to `git`. 131 * The `github` changelog will only work if both tags exist in GitHub. 132 133 [nightly]: ./nightlies.md