-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
43 lines (38 loc) · 1.11 KB
/
.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
sudo: required
language: go
go:
- "1.12.x"
env:
global:
- GOPROXY=https://proxy.golang.org
- GO111MODULE=on
before_script:
- go install github.com/golangci/golangci-lint/cmd/golangci-lint
jobs:
include:
# - stage: Lint
# script:
# - golangci-lint run
# - stage: Test
# script:
# - go test -v -race ./...
- stage: Release application
before_install:
- sudo apt-get install gcc-multilib gcc-mingw-w64
script:
- GOARCH=amd64 GOOS=linux go build -o tomox-sdk.$TRAVIS_TAG.linux.amd64
- CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ GOARCH=amd64 GOOS=windows go build -o tomox-sdk.$TRAVIS_TAG.amd64.exe
deploy:
provider: releases
api_key: $GH_TOKEN
skip_cleanup: true
overwrite: true
file:
- tomox-sdk.$TRAVIS_TAG.linux.amd64
- tomox-sdk.$TRAVIS_TAG.amd64.exe
on:
tags: true
stages:
# - name: Lint
- name: Release application
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = tomochain/tomox-sdk