From a938213507488ed01c7cc7bee2bcd44884dc5842 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Tue, 17 Sep 2019 16:06:28 -0700 Subject: [PATCH] Add goreleaser scripts (#161) --- .goreleaser.yml | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 12 +++++++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000000..aca368a9ff --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,77 @@ +# This is an example goreleaser.yaml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +before: + hooks: +builds: + - + id: "s2c" + binary: s2c + main: ./s2/cmd/s2c/main.go + env: + - CGO_ENABLED=0 + goos: + - linux + - freebsd + - netbsd + - windows + goarch: + - 386 + - amd64 + - arm + - arm64 + - ppc64 + - ppc64le + - mips64 + - mips64le + goarm: + - 7 + - + id: "s2d" + binary: s2d + main: ./s2/cmd/s2d/main.go + env: + - CGO_ENABLED=0 + goos: + - linux + - freebsd + - netbsd + - windows + goarch: + - 386 + - amd64 + - arm + - arm64 + - ppc64 + - ppc64le + - mips64 + - mips64le + goarm: + - 7 + +archives: + - + id: s2-binaries + replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 + freebsd: FreeBSD + netbsd: NetBSD + format_overrides: + - goos: windows + format: zip + files: + - s2/LICENSE + - s2/README.md +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/.travis.yml b/.travis.yml index 22d94138dd..3d8fae7abf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ script: - go test -v -cpu=2 ./... - go test -cpu=2 -tags=noasm ./... - go test -cpu=1,4 -short -race ./... - - go build github.com/klauspost/compress/s2/cmd/s2c && go build github.com/klauspost/compress/s2/cmd/s2d && s2c && s2d + - go build github.com/klauspost/compress/s2/cmd/s2c && go build github.com/klauspost/compress/s2/cmd/s2d && s2c s2c && s2d s2c.s2 - GOOS=linux GOARCH=386 go install ./... matrix: @@ -41,3 +41,13 @@ jobs: go: 1.12.x script: - ./fuzzit.sh fuzzing + +after_success: +# calls goreleaser +deploy: +- provider: script + skip_cleanup: true + script: curl -sL https://git.io/goreleaser | bash + on: + tags: true + condition: $TRAVIS_OS_NAME = linux