diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index a590d80..0438710 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -14,7 +14,7 @@ builds:
- windows
- darwin
ldflags:
- - -X github.com/laureanray/clibgen/cmd.version=`git tag --sort=-version:refname | head -n `
+ - -s -w -X github.com/laureanray/clibgen/cmd.version={{.Version}}
checksum:
name_template: 'checksums.txt'
snapshot:
diff --git a/dist/config.yaml b/dist/config.yaml
new file mode 100644
index 0000000..ada0366
--- /dev/null
+++ b/dist/config.yaml
@@ -0,0 +1,126 @@
+project_name: clibgen
+release:
+ github:
+ owner: laureanray
+ name: clibgen
+ name_template: '{{.Tag}}'
+builds:
+ - id: clibgen
+ goos:
+ - linux
+ - windows
+ - darwin
+ goarch:
+ - amd64
+ - arm64
+ - "386"
+ goarm:
+ - "6"
+ gomips:
+ - hardfloat
+ goamd64:
+ - v1
+ targets:
+ - linux_amd64_v1
+ - linux_arm64
+ - linux_386
+ - windows_amd64_v1
+ - windows_arm64
+ - windows_386
+ - darwin_amd64_v1
+ - darwin_arm64
+ dir: .
+ main: .
+ binary: clibgen
+ builder: go
+ gobinary: go
+ command: build
+ ldflags:
+ - -X github.com/laureanray/clibgen/cmd.version=`git tag --sort=-version:refname | head -n `
+ env:
+ - CGO_ENABLED=0
+archives:
+ - id: default
+ name_template: '{{.ProjectName}}_{{.Os}}-{{.Arch}}'
+ format: tar.gz
+ format_overrides:
+ - goos: windows
+ format: zip
+ files:
+ - src: license*
+ - src: LICENSE*
+ - src: readme*
+ - src: README*
+ - src: changelog*
+ - src: CHANGELOG*
+snapshot:
+ name_template: clibgen
+checksum:
+ name_template: checksums.txt
+ algorithm: sha256
+changelog:
+ filters:
+ exclude:
+ - '^docs:'
+ - '^test:'
+ sort: asc
+dist: dist
+env_files:
+ github_token: ~/.config/goreleaser/github_token
+ gitlab_token: ~/.config/goreleaser/gitlab_token
+ gitea_token: ~/.config/goreleaser/gitea_token
+before:
+ hooks:
+ - go mod tidy
+ - go generate ./...
+source:
+ name_template: '{{ .ProjectName }}-{{ .Version }}'
+ format: tar.gz
+gomod:
+ gobinary: go
+announce:
+ twitter:
+ message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
+ mastodon:
+ message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
+ server: ""
+ reddit:
+ title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
+ url_template: '{{ .ReleaseURL }}'
+ slack:
+ message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
+ username: GoReleaser
+ discord:
+ message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
+ author: GoReleaser
+ color: "3888754"
+ icon_url: https://goreleaser.com/static/avatar.png
+ teams:
+ title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
+ message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
+ color: '#2D313E'
+ icon_url: https://goreleaser.com/static/avatar.png
+ smtp:
+ subject_template: '{{ .ProjectName }} {{ .Tag }} is out!'
+ body_template: 'You can view details from: {{ .ReleaseURL }}'
+ mattermost:
+ message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
+ title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
+ username: GoReleaser
+ linkedin:
+ message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
+ telegram:
+ message_template: '{{ .ProjectName }} {{ mdv2escape .Tag }} is out! Check it out at {{ mdv2escape .ReleaseURL }}'
+ parse_mode: MarkdownV2
+ webhook:
+ message_template: '{ "message": "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"}'
+ content_type: application/json; charset=utf-8
+ opencollective:
+ title_template: '{{ .Tag }}'
+ message_template: '{{ .ProjectName }} {{ .Tag }} is out!
Check it out at {{ .ReleaseURL }}'
+git:
+ tag_sort: -version:refname
+github_urls:
+ download: https://github.com
+gitlab_urls:
+ download: https://gitlab.com