forked from idena-network/idena-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (40 loc) · 999 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
dist: xenial
language: go
env:
- GO111MODULE=on
go:
- 1.13.x
matrix:
include:
- if: branch =~ /v\d+\.\d+\.\d+/
os: windows
- if: branch =~ /v\d+\.\d+\.\d+/
os: osx
- os: linux
branches:
only:
- master
- /fork\/\d+\.\d+\.\d+/
- /v\d+\.\d+\.\d+/
cache:
directories:
- $GOPATH/pkg/mod
git:
depth: 1
install: true
before_script:
- export VERSION=${TRAVIS_TAG:1}
script:
- go test -v ./...
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then go build -ldflags "-X main.version=${VERSION}" -o=builds/idena-node-linux-$VERSION; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then go build -ldflags "-X main.version=${VERSION}" -o=builds/idena-node-win-$VERSION.exe; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then go build -ldflags "-X main.version=${VERSION}" -o=builds/idena-node-mac-$VERSION; fi
deploy:
provider: releases
api_key: "$GH_TOKEN"
file_glob: true
file: builds/*
skip_cleanup: true
draft: true
on:
tags: true