diff --git a/.gitignore b/.gitignore index 9be1213..0eb1a08 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules docs/dist +dist + diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..4ef1157 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,31 @@ +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of uname. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + +checksum: + name_template: "checksums.txt" +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" diff --git a/Makefile b/Makefile index dda333b..8c8edb8 100644 --- a/Makefile +++ b/Makefile @@ -18,3 +18,9 @@ install-deps: lint: golangci-lint run --fix --out-format=line-number --issues-exit-code=0 --config .golangci.yml --color always ./... +release-dry: + @goreleaser release --snapshot --clean + +release: + @goreleaser release --skip-validate --clean +