Skip to content

Commit b44f0ef

Browse files
committed
[add] Kicked off release process via github actions
1 parent b8f39a3 commit b44f0ef

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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/[email protected]
27+
env:
28+
GITHUB_TOKEN: ${{ github.token }}
29+
with:
30+
asset_paths: '["./bin/k3sup*"]'

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ GOGET=$(GOCMD) get
88
GOMOD=$(GOCMD) mod
99
GOFMT=$(GOCMD) fmt
1010
DISTDIR = ./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

1516
build:
1617
$(GOBUILD) .
@@ -42,7 +43,7 @@ coverage: get test
4243
release:
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

4748
publish: release
4849
@for f in $(shell ls ${DISTDIR}); \

0 commit comments

Comments
 (0)