File tree Expand file tree Collapse file tree 2 files changed +80
-0
lines changed Expand file tree Collapse file tree 2 files changed +80
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Test
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ pull_request :
7
+
8
+ jobs :
9
+ lint :
10
+ name : Lint
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Set up Go
14
+ uses : actions/setup-go@v2
15
+ with :
16
+ go-version : 1.15
17
+
18
+ - name : Check out code
19
+ uses : actions/checkout@v2
20
+
21
+ - name : Lint Go Code
22
+ run : |
23
+ go get -u golang.org/x/lint/golint
24
+ golint -set_exit_status ./...
25
+
26
+ test :
27
+ name : Test
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - name : Set up Go
31
+ uses : actions/setup-go@v2
32
+ with :
33
+ go-version : 1.15
34
+
35
+ - name : Check out code
36
+ uses : actions/checkout@v2
37
+
38
+ - name : Run Unit tests.
39
+ run : go test ./...
40
+
41
+ build :
42
+ name : Build
43
+ runs-on : ubuntu-latest
44
+ needs : [lint, test]
45
+ steps :
46
+ - name : Set up Go
47
+ uses : actions/setup-go@v2
48
+ with :
49
+ go-version : 1.15
50
+
51
+ - name : Check out code
52
+ uses : actions/checkout@v2
53
+
54
+ - name : Build
55
+ run : go build .
Original file line number Diff line number Diff line change
1
+ name : Release
2
+ on :
3
+ create :
4
+ tags :
5
+ - v*
6
+
7
+ jobs :
8
+ release :
9
+ name : Release on GitHub
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Check out code
13
+ uses : actions/checkout@v2
14
+
15
+ - name : Validates GO releaser config
16
+ uses : docker://goreleaser/goreleaser:latest
17
+ with :
18
+ args : check
19
+
20
+ - name : Create release on GitHub
21
+ uses : docker://goreleaser/goreleaser:latest
22
+ with :
23
+ args : release
24
+ env :
25
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments