-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (34 loc) · 1.09 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
language: go
go:
- release
stages:
- test
- name: deploy
if: tag IS present
jobs:
include:
- stage: test
script:
- go test -v -race ./...
- stage: deploy
script:
- go get -u -v github.com/inconshreveable/mousetrap # needed for windows
- GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -v -o tt-$TRAVIS_TAG-linux64
- GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -v -o tt-$TRAVIS_TAG-linux-arm64
- GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -v -o tt-$TRAVIS_TAG-darwin64
- GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -v -o tt-$TRAVIS_TAG-win64.exe
- md5sum tt-$TRAVIS_TAG-linux64
- md5sum tt-$TRAVIS_TAG-linux-arm64
- md5sum tt-$TRAVIS_TAG-darwin64
- md5sum tt-$TRAVIS_TAG-win64.exe
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file:
- tt-$TRAVIS_TAG-linux64
- tt-$TRAVIS_TAG-linux-arm64
- tt-$TRAVIS_TAG-darwin64
- tt-$TRAVIS_TAG-win64.exe
skip_cleanup: true
on:
tags: true