github.com/goreleaser/goreleaser@v1.25.1/www/docs/customization/git.md (about) 1 # Git 2 3 > Since v1.14 4 5 This allows you to change the behavior of some Git commands. 6 7 ```yaml 8 # .goreleaser.yaml 9 git: 10 # What should be used to sort tags when gathering the current and previous 11 # tags if there are more than one tag in the same commit. 12 # 13 # Default: '-version:refname' 14 tag_sort: -version:creatordate 15 16 # What should be used to specify prerelease suffix while sorting tags when gathering 17 # the current and previous tags if there are more than one tag in the same commit. 18 # 19 # Since: v1.17 20 prerelease_suffix: "-" 21 22 # Tags to be ignored by GoReleaser. 23 # This means that GoReleaser will not pick up tags that match any of the 24 # provided values as either previous or current tags. 25 # 26 # Since: v1.21 27 # Templates: allowed 28 ignore_tags: 29 - nightly 30 - "{{.Env.IGNORE_TAG}}" 31 32 # Tags that begin with these prefixes will be ignored. 33 # 34 # This feature is only available in GoReleaser Pro. 35 # Since: v1.24 (pro) 36 # Templates: allowed 37 ignore_tag_prefixes: 38 - foo/ 39 - "{{.Env.IGNORE_TAG_PREFIX}}/bar" 40 ``` 41 42 ## Semver sorting 43 44 > Since v1.21 (pro) 45 46 This allows you to sort tags by semver: 47 48 ```yaml 49 # .goreleaser.yml 50 git: 51 tag_sort: semver 52 ``` 53 54 It'll parse all tags, ignoring non-semver-compatible tags, and sort from newest 55 to oldest, so the latest tag is returned. 56 57 This has the effect of sorting non-pre-release tags before pre-release ones, 58 which is different from what other git sorting options might give you. 59 60 !!! success "GoReleaser Pro" 61 62 Semver sorting is a [GoReleaser Pro feature](/pro/).