File tree Expand file tree Collapse file tree 5 files changed +48
-29
lines changed
Expand file tree Collapse file tree 5 files changed +48
-29
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+ on :
3+ push :
4+ branches :
5+ - master
6+ pull_request :
7+ branches :
8+ - master
9+ jobs :
10+ build :
11+ name : Build
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v2
15+ - uses : actions/setup-go@v2
16+ - name : Build
17+ run : make build
Original file line number Diff line number Diff line change 1+ name : Release
2+ on :
3+ push :
4+ tags :
5+ - " *.*.*"
6+ jobs :
7+ create_release :
8+ name : Create release
9+ runs-on : ubuntu-latest
10+ env :
11+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12+ steps :
13+ - uses : actions/checkout@v2
14+ - uses : actions/setup-go@v2
15+ - id : get_version
16+ run : echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
17+ - name : Install dependencies
18+ run : |
19+ go get github.com/mitchellh/gox
20+ go get github.com/tcnksm/ghr
21+ - name : Add GOPATH to search path
22+ run : echo `go env GOPATH`/bin >> $GITHUB_PATH
23+ - name : Build
24+ run : make all
25+ env :
26+ VERSION : ${{ steps.get_version.outputs.VERSION }}
27+ - name : Create release
28+ run : ./new_release.sh
29+ env :
30+ VERSION : ${{ steps.get_version.outputs.VERSION }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11# This how we want to name the binary output
22BINARY =./build/vt
33
4- # These are the value we want to pass for VERSION
5- VERSION =` git describe `
6-
74# Setup the -ldflags option for go build here, interpolate the variable values
85LDFLAGS =-ldflags "-X github.com/VirusTotal/vt-cli/cmd.Version=${VERSION}"
96
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ zip -j dist/Linux32.zip build/linux/386/vt
66zip -j dist/Linux64.zip build/linux/amd64/vt
77zip -j dist/Windows32.zip build/windows/386/vt.exe
88zip -j dist/Windows64.zip build/windows/amd64/vt.exe
9- ghr -t $GITHUB_TOKEN -u VirusTotal -replace $TRAVIS_TAG dist/
9+ ghr -t $GITHUB_TOKEN -u VirusTotal -replace $VERSION dist/
You can’t perform that action at this time.
0 commit comments