From 68eeac38901213c0b01074499a4c831c251c478f Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 17 Nov 2020 16:40:03 +0100 Subject: [PATCH] chore: Introduce go releaser --- .gitignore | 1 + .goreleaser.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 12 ++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.gitignore b/.gitignore index 722d5e7..9df1745 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .vscode +dist diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..6e0d58b --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,36 @@ +before: + hooks: + - go mod download +builds: + - id: nsd + dir: nsd + binary: nsd + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + ignore: + - goos: darwin + goarch: 386 + - goos: linux + goarch: 386 +archives: + - replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^chore:' + - '^test:' diff --git a/.travis.yml b/.travis.yml index d5f9166..67016ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,14 @@ language: go go: "1.15" + +script: + - go test ./... + - curl -sfL https://git.io/goreleaser | sh -s -- check + +deploy: + - provider: script + skip_cleanup: true + script: curl -sL https://git.io/goreleaser | bash + on: + tags: true + condition: $TRAVIS_OS_NAME = linux