Skip to content

Commit

Permalink
another bit of #9: create github releases from the hacky release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Corso committed Jun 6, 2018
1 parent c02e276 commit 63626e6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,34 @@
# use like this:
# VERSION=1.0.1 ./release.sh

set -e

rm -rf "bin/sachet-$VERSION.linux-amd64"
mkdir "bin/sachet-$VERSION.linux-amd64"
env GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o "bin/sachet-$VERSION.linux-amd64/sachet" github.com/messagebird/sachet/cmd/sachet
cd bin
tar -zcvf "sachet-$VERSION.linux-amd64.tar.gz" "sachet-$VERSION.linux-amd64"

GITHUB_USER=messagebird
GITHUB_REPO=sachet

# go get -u github.com/aktau/github-release
# dont forget to set your token like
# export GITHUB_TOKEN=blabla
git tag -a $VERSION -m "version $VERSION"

github-release release \
--user $GITHUB_USER \
--repo $GITHUB_REPO \
--tag $VERSION \
--name $VERSION \
--description "version $VERSION!"

github-release upload \
--user $GITHUB_USER \
--repo $GITHUB_REPO \
--tag $VERSION \
--name "sachet-$VERSION.linux-amd64.tar.gz" \
--file "sachet-$VERSION.linux-amd64.tar.gz"


0 comments on commit 63626e6

Please sign in to comment.