Skip to content

Commit

Permalink
[GH-37] publish artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
030 committed May 14, 2019
1 parent 5d53b71 commit 08aea5d
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,34 @@ language: go
go:
- 1.12.4
env:
- GO111MODULE=on
global:
- SHA512_CMD=sha512sum
- GO111MODULE=on
matrix:
include:
- os: linux
dist: bionic
- os: osx
env: SHA512_CMD="shasum -a 512"
- os: windows
addons:
sonarcloud:
organization: 030-github
token:
secure: $SONAR_TOKEN
script:
- diff -u <(echo -n) <(gofmt -d ./)
- export DELIVERABLE="n3dr-${TRAVIS_OS_NAME}"
- go test -short -cover -v -coverprofile=coverage.out -covermode=atomic ./...
- sonar-scanner -Dsonar.projectKey=030_n3dr -Dsonar.sources=. -Dsonar.host.url=https://sonarcloud.io -Dsonar.coverage.exclusions=main.go,**/*_test.go -Dsonar.go.coverage.reportPaths="coverage.out"
- go build -o $DELIVERABLE
- $SHA512_CMD $DELIVERABLE > ${DELIVERABLE}.sha512.txt
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then sonar-scanner -Dsonar.projectKey=030_n3dr -Dsonar.sources=. -Dsonar.host.url=https://sonarcloud.io -Dsonar.coverage.exclusions=**/*_test.go -Dsonar.go.coverage.reportPaths="coverage.out"; fi
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file:
- $DELIVERABLE
- ${DELIVERABLE}.sha512.txt
skip_cleanup: true
on:
tags: true

0 comments on commit 08aea5d

Please sign in to comment.