diff --git a/.gitignore b/.gitignore index ce2eb8e..61c9956 100644 --- a/.gitignore +++ b/.gitignore @@ -22,8 +22,10 @@ go.work .idea .DS_Store +.vscode .vscode/* vendor/* bin bin/* -pkg/ \ No newline at end of file +pkg/ +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..0d0d71c --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,62 @@ +# 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 + +project_name: vaul7y +version: 1 + +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + + +builds: + - binary: vaul7y + env: + - CGO_ENABLED=0 + goos: + - windows + - darwin + - linux + goarch: + - amd64 + - arm64 + goarm: + - 6 + - 7 + ldflags: + - -s -w -X "main.buildVersion={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})" + dir: ./cmd/vaul7y/ + + +archives: + - name_template: >- + {{ .ProjectName }}_{{ .Version }}_ + {{- if eq .Os "darwin" }}Darwin + {{- else if eq .Os "linux" }}Linux + {{- else if eq .Os "windows" }}Windows + {{- else }}{{ .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + +checksum: + name_template: 'checksums.txt' + +snapshot: + name_template: "{{ incpatch .Version }}-next" + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + +universal_binaries: + - replace: true