File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ publish :
10+ strategy :
11+ matrix :
12+ go-version : [ 1.15.x ]
13+ os : [ ubuntu-latest ]
14+ runs-on : ${{ matrix.os }}
15+ steps :
16+ - uses : actions/checkout@master
17+ with :
18+ fetch-depth : 1
19+ - name : Install Go
20+ uses : actions/setup-go@v2
21+ with :
22+ go-version : ${{ matrix.go-version }}
23+ - name : Make all
24+ run : make all
25+ - name : Upload release binaries
26+ uses : alexellis/upload-assets@0.3.0
27+ env :
28+ GITHUB_TOKEN : ${{ github.token }}
29+ with :
30+ asset_paths : ' ["./bin/k3sup*"]'
Original file line number Diff line number Diff line change @@ -8,9 +8,10 @@ GOGET=$(GOCMD) get
88GOMOD =$(GOCMD ) mod
99GOFMT =$(GOCMD ) fmt
1010DISTDIR = ./dist
11+ OS_ARCHs = "linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
1112
1213.PHONY : all test coverage
13- all : test coverage build
14+ all : test build release
1415
1516build :
1617 $(GOBUILD ) .
@@ -42,7 +43,7 @@ coverage: get test
4243release :
4344 $(GOGET ) github.com/mitchellh/gox
4445 $(GOGET ) github.com/tcnksm/ghr
45- GO111MODULE=on gox -osarch " linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64 " -output " ${DISTDIR} /redis-benchmark-go_{{.OS}}_{{.Arch}}" .
46+ GO111MODULE=on gox -osarch ${OS_ARCHs} -output " ${DISTDIR} /redis-benchmark-go_{{.OS}}_{{.Arch}}" .
4647
4748publish : release
4849 @for f in $(shell ls ${DISTDIR}) ; \
You can’t perform that action at this time.
0 commit comments