File tree 1 file changed +49
-0
lines changed
1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test and build Go
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Check out
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Setup Go
17
+ uses : actions/setup-go@v4
18
+ with :
19
+ go-version : ' 1.20'
20
+ cache-dependency-path : go.sum
21
+
22
+ - name : Install dependencies
23
+ run : |
24
+ go get .
25
+
26
+ - name : Run tests
27
+ run : go test -v
28
+
29
+ build :
30
+ runs-on : ubuntu-latest
31
+ needs : test
32
+ if : github.ref == 'refs/heads/master'
33
+ strategy :
34
+ matrix :
35
+ os : [ linux, darwin ]
36
+ arch : [ amd64, arm64 ]
37
+
38
+ steps :
39
+ - name : Check out
40
+ uses : actions/checkout@v4
41
+
42
+ - uses : wangyoucao577/go-release-action@v1
43
+ with :
44
+ github_token : ${{ secrets.GITHUB_TOKEN }}
45
+ goos : ${{ matrix.os }}
46
+ goarch : ${{ matrix.arch }}
47
+ release_tag : latest
48
+ binary_name : gobbler
49
+ overwrite : true
You can’t perform that action at this time.
0 commit comments