File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : build
2+
3+ on :
4+ push :
5+ branches :
6+ - ' master'
7+ tags :
8+ - ' v*'
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ -
15+ name : Set up Go
16+ uses : actions/setup-go@v2
17+ with :
18+ go-version : 1.15
19+
20+ -
21+ name : Checkout
22+ uses : actions/checkout@v2
23+ with :
24+ fetch-depth : 0
25+
26+ -
27+ name : Tests
28+ run : |
29+ export GOPATH=/home/runner/go
30+ mkdir -p $GOPATH/src/github.com/`dirname $GITHUB_REPOSITORY`
31+ mv $GITHUB_WORKSPACE $GOPATH/src/github.com/$GITHUB_REPOSITORY
32+ ln -s $GOPATH/src/github.com/$GITHUB_REPOSITORY $GITHUB_WORKSPACE
33+ # go mod tidy
34+ go get -v ./...
35+ go test -v ./...
36+
37+ -
38+ name : Run GoReleaser
39+ uses : goreleaser/goreleaser-action@v2
40+ if : success() && startsWith(github.ref, 'refs/tags/')
41+ with :
42+ version : latest
43+ args : release --rm-dist
44+ env :
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 22
33language : go
44
5+ env :
6+ global :
7+ - VERSION="${TRAVIS_TAG:=0.0~git$(date +%Y%m%d)-1}"
8+ # Build time setup
9+ - TZ=America/Toronto
10+ - DATE_BUILD=`date -I`
11+
512script :
613
14+ - date
15+ - echo $DATE_BUILD $VERSION
16+ - echo
17+
718 - go get -t -v ./...
819 - go build -v -ldflags="-X main.date=$DATE_BUILD"
920 - wireframe
You can’t perform that action at this time.
0 commit comments