-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
50 lines (40 loc) · 1.62 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
44
45
46
47
48
49
50
language: go
go:
- 1.14.x
# Don't email me the results of the test runs.
notifications:
email: false
env:
global:
- PATH="$GOPATH/bin:$PATH"
- RELEASES_PATH=/tmp/releases
before_script:
# - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
script:
- go test -bench= -race -test.v ./...
# - docker run -ti --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.24.0 golangci-lint run -v
# - golangci-lint run
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "Valeriy Soloviov"
- git config --local user.email "[email protected]"
- export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
- git tag $TRAVIS_TAG || true
- go get github.com/laher/goxc
- goxc -tasks 'xc archive' -bc 'darwin linux' -d "$RELEASES_PATH" -resources-include 'README*' -build-ldflags="-X github.com/weldpua2008/supraworker/cmd.GitCommit=${TRAVIS_TAG} "
deploy:
skip_cleanup: true
provider: releases
api_key: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
file:
- $RELEASES_PATH/snapshot/supraworker_windows_386.zip
- $RELEASES_PATH/snapshot/supraworker_windows_amd64.zip
- $RELEASES_PATH/snapshot/supraworker_darwin_386.zip
- $RELEASES_PATH/snapshot/supraworker_darwin_amd64.zip
- $RELEASES_PATH/snapshot/supraworker_linux_386.tar.gz
- $RELEASES_PATH/snapshot/supraworker_linux_amd64.tar.gz
- $RELEASES_PATH/snapshot/supraworker_linux_arm.tar.gz
on:
repo: weldpua2008/supraworker
tags: true
draft: true