From a096844fce198bedecbacc34ca117710d72801f0 Mon Sep 17 00:00:00 2001 From: ohkinozomu Date: Mon, 16 Aug 2021 09:08:13 +0900 Subject: [PATCH] Update goreleaser --- .github/workflows/goreleaser.yaml | 5 +++-- .gitignore | 2 ++ .goreleaser.yml | 32 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml index 34fe041..b5b5388 100644 --- a/.github/workflows/goreleaser.yaml +++ b/.github/workflows/goreleaser.yaml @@ -1,8 +1,9 @@ name: goreleaser on: - release: - types: [published] + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" jobs: goreleaser: diff --git a/.gitignore b/.gitignore index 66fd13c..5800750 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ # Dependency directories (remove the comment below to include it) # vendor/ + +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..43890f8 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,32 @@ +# This is an example .goreleaser.yml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +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 + goos: + - linux + - windows + - darwin +archives: + - replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'