Skip to content

Commit

Permalink
Add publish releases
Browse files Browse the repository at this point in the history
  • Loading branch information
tjamet committed Dec 18, 2018
1 parent 2222d2c commit a403d53
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kubectl-switch
kubectl/test-home
kubectl/test-home./release
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,15 @@ language: go
go:
- "1.10"
- "1.11"
install: true # bypass vendoring, we are using dep
install: true # bypass vendoring, we are using vendoring
before_deploy: bash -e ./release.sh
deploy:
provider: releases
api_key:
secure: "plSiXgXu6+o9SWiQZJY88fR7d2SzHtl/ys13bJkfZkvutYa258U9cxzMP0cTKr2gXcIcPXX1aeWiEhASG+Veu39X/Jg3+dG5jznGWXANisCCQSGyEnTWmyZW02mxO2gVeL1Y7FoyWIURbUeIIPxxjPXd8VFASWL7P0jG4AS3jXfUB6v/OkmRe8r3E5mzs7HN7b9dB80EkSOJnFOOpDsrPdc0+5xQHVvG0HRYYbE/6Dgzty8F4czKK7byR2bkXmfR+cb40+4IO0bTrYMUIuHzDWEs7+jq48JmEBPnwSDx0LrAzcL/IhM8Jz1tDgxKrGgvWZ9cPGq2WAm/X3RP+qOcS6cwRihHJMnu3tyTuG7H/UzRc3IpQpyiKUph8P2dGo911ZP/5Qao5cO2WhbEHlyEybifO+gyEDShfHCr3FnZWv5uODUKmG/b8E69VvrhkBYly4bcPnhNxmtsXnmwYpTPh/RW79D4lzvTEzmLSLclHbEoIL+h3eEVGxbZJXK1XYBL+ZV4mfgoEM+9fyQZzuM4JWhMKBh3QeBg6InDJ261bINTyw6q41u6xy0lXWzta2cFmIHE7t5/vjhEtbglctAypB1qY1FA5wE3SJ4wFI2ORkNxrfYYk8JqE6bp5i6S79kfeT6JlwtH6ioeonUXBNWyYnV7fRRGIQIOqrfQBzQmXu0="
file_glob: true
file: ./release/*
skip_cleanup: true
on:
tags: true
go: '1.11'
15 changes: 15 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e

mkdir -p release
for os in linux darwin; do
for arch in amd64 386; do
echo "building for ${os} ${arch}"
CGO_ENABLED=0 GOARCH=${arch} GOOS=${os} go build -o release/kubectl-switch-${os}-${arch} .
done
cp release/kubectl-switch-${os}-amd64 release/kubectl-switch-${os}-x86_64
done

for f in $(ls ./release/); do
shasum -a 1 ./release/${f} | awk '{print $1}' > ./release/${f}.sha1sum
shasum -a 256 ./release/${f} | awk '{print $1}' > ./release/${f}.sha256sum
done

0 comments on commit a403d53

Please sign in to comment.