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
+
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
8
8
GOMOD =$(GOCMD ) mod
9
9
GOFMT =$(GOCMD ) fmt
10
10
DISTDIR = ./dist
11
+ OS_ARCHs = "linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
11
12
12
13
.PHONY : all test coverage
13
- all : test coverage build
14
+ all : test build release
14
15
15
16
build :
16
17
$(GOBUILD ) .
@@ -42,7 +43,7 @@ coverage: get test
42
43
release :
43
44
$(GOGET ) github.com/mitchellh/gox
44
45
$(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}}" .
46
47
47
48
publish : release
48
49
@for f in $(shell ls ${DISTDIR}) ; \
You can’t perform that action at this time.
0 commit comments