File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release on commit or tag
2+ on :
3+ push :
4+ branches :
5+ - master
6+ - release/*
7+ create :
8+ tags :
9+ - v*
10+ jobs :
11+ build :
12+ name : Build
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Set up Go 1.13
16+ uses : actions/setup-go@v1
17+ with :
18+ go-version : 1.13
19+
20+ - name : Check out source code
21+ uses : actions/checkout@master
22+
23+ - name : Build OS X binary
24+ run : GOOS=darwin GOARCH=amd64 go build -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-darwin64 -a -ldflags '-s -w' .
25+
26+ - name : Build Linux binary
27+ run : GOOS=linux GOARCH=amd64 go build -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-linux64 -a -ldflags '-s -w' .
28+
29+ - name : Build ARM binary
30+ run : GOOS=linux GOARCH=arm GOARM=6 go build -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-arm -a -ldflags '-s -w' .
31+
32+ - name : Build windows binary
33+ run : GOOS=windows GOARCH=amd64 go build -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2).exe -a -ldflags '-s -w' .
34+
35+ - name : Install olsu
36+ run : wget https://github.com/Telling/olsu/releases/download/v0.1.0/olsu-linux-amd64.zip && unzip olsu-linux-amd64.zip && chmod +x olsu-linux-amd64 && pwd && ls -la
37+
38+ - name : Create or update release
39+ env :
40+ OLSU_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ OLSU_DELETE_RELEASE : yes
42+ run : ./olsu-linux-amd64 -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 1) -r $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2) "Latest release" "latest" "Automatic release" $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-darwin64 $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-linux64 $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-arm # $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2).exe
You can’t perform that action at this time.
0 commit comments