Skip to content

Commit

Permalink
Update goreleaser config to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
cudevmaxwell committed Aug 7, 2024
1 parent 86659e7 commit 8b2c2f3
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2

before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...

builds:
- env:
- CGO_ENABLED=0
targets:
- go_first_class

archives:
- format: tar.gz
wrap_in_directory: true
# this name template makes the OS and Arch compatible with the results of uname.
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
Expand All @@ -16,16 +33,12 @@ archives:
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
checksum:
algorithm: sha256
name_template: 'checksums.sha265'
snapshot:
name_template: "{{ incpatch .Version }}-next"
- goos: windows
format: zip

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"

0 comments on commit 8b2c2f3

Please sign in to comment.