Skip to content

Commit

Permalink
add travis deploy script (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
Honglei-Cong authored Apr 16, 2020
1 parent 0e21e81 commit 510a8c0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .travis.deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -ex

VERSION=$(git describe --always --tags --long)
PLATFORM=""

if [[ ${TRAVIS_OS_NAME} == 'linux' ]]; then
PLATFORM="linux"
elif [[ ${TRAVIS_OS_NAME} == 'osx' ]]; then
PLATFORM="darwin"
else
PLATFORM="windows"
exit 1
fi

env GO111MODULE=on make DNA-${PLATFORM}

set +x
echo "dnaNode-${PLATFORM}-amd64 |" $(md5sum dnaNode-${PLATFORM}-amd64|cut -d ' ' -f1)

17 changes: 16 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,28 @@ go_import_path: github.com/DNAProject/DNA

os:
- linux
- osx

go:
- 1.12.x

script:
- env GO111MODULE=on make all-cross
- env GO111MODULE=on make DNA
- env GO111MODULE=on go mod vendor
- bash ./.travis.check-license.sh
- bash ./.travis.gofmt.sh
- bash ./.travis.gotest.sh
- bash ./.travis.deploy.sh

deploy:
provider: releases
token: "${GITHUB_TOKEN}"
file_glob: true
file:
- dnaNode*
skip_cleanup: true
overwrite: true
draft: true
on:
repo: DNAProject/DNA
tags: true

0 comments on commit 510a8c0

Please sign in to comment.