testing a deploy with travis

This commit is contained in:
Dan Markham 2019-04-04 23:54:40 -07:00
parent 988c3334e5
commit f524145d2a
No known key found for this signature in database
GPG Key ID: 7994037517927D77
3 changed files with 46 additions and 5 deletions

2
.gitignore vendored
View File

@ -4,7 +4,7 @@
*.o
*.a
*.so
cli
# Folders
_obj
_test

View File

@ -1,6 +1,28 @@
language: go
go:
- "1.12.x"
- "1.11.x"
matrix:
allow_failures:
- go: master
include:
- go: 1.11.x
- go: 1.12.x
- go: master
env:
global:
- GO111MODULE=on
after_success:
- make build-cli
deploy:
- provider: releases
api_key:
secure: AUbu2A4D6a7gzbmnJMcOILLMTcRLvC0MyEPQFJw1apRXAMRi4hWDYfmR9L3CdftvyMPyKzhRsCeXk3AuvcjsVN4IPglb/3Uy4Ot52vHfRbMNY6H+dMU/rBq+VFFzFaTzvIYCR9ai9EwhiORVpO1QMip+aATQE2sEQJOVC/uf373wrn+u6TVOiTvskTlR8aCRCW/MibdYzZXiuCdKoPgCqUxAXYStIuc62PX9Y8EP2GZ5N6nCNAlVY64XjStQyi5d19nJzQuvG0x6/JQe99Z39H6yEDWkBMaCPPtP0yPZcwGQ5BxummKLtZP7QM83wSuS3954IhHDFabZc7It36uBu7KuBZZsURAVCnKU54WB0MO17naWxuTClqMxHBes3j9iVGw8BWaNzVORqb+JQ09cytn+BcaoOqvvfovDzmYmqBxT+dy1ZgtLp2cgk+be5mjPC1FvrtIKhqDE+fKqhw+Ogmq7L2F7Oe4WZqGj0iFGbSBODxaRW9T1OylrlUol76Qjd0ylbOQ4i/x3luu5LiRICNXw61IvgTEtmCjt1e3K6flbrGDk7XTCMKKvVekJQsm+oYzSnTVi/p8rT1ZXPfR3X0qtKkbU3T8o3dH/AqfqnUBaE7O5tqNvq+eTqUuoLoRogUpjjLa9IL4a4m+Gn6ZsxdyAPNycFesyIEZd1cupoTg=
skip_cleanup: true
draft: true
on:
go: 1.12.x
repo: dmarkham/enumer
tags: true
file:
- cli/build/enumer.linux-amd64.tar.gz
- cli/build/enumer.darwin-amd64.tar.gz
- cli/build/enumer.windows-amd64.exe.tar.gz
- cli/build/sha256sum.txt

19
Makefile Normal file
View File

@ -0,0 +1,19 @@
build-cli: clean
-mkdir -p ./cli/build
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o ./cli/build/enumer.linux-amd64 .
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -o ./cli/build/enumer.darwin-amd64 .
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -a -o ./cli/build/enumer.windows-amd64.exe .
cd ./cli/build && find . -name 'enumer*' | xargs -I{} tar czf {}.tar.gz {}
cd ./cli/build && shasum -a 256 * > sha256sum.txt
cat ./cli/build/sha256sum.txt
# example: make release V=0.0.0
release:
git tag v$(V)
@read -p "Press enter to confirm and push to origin ..." && git push origin v$(V)
clean:
-rm -r ./cli/build