Commit 0e9c9db 1 parent f940948 commit 0e9c9db Copy full SHA for 0e9c9db
File tree 6 files changed +131
-1
lines changed
6 files changed +131
-1
lines changed Original file line number Diff line number Diff line change 4
4
directory : " /"
5
5
schedule :
6
6
interval : daily
7
- time : " 02:00"
8
7
open-pull-requests-limit : 10
Original file line number Diff line number Diff line change
1
+ name : Go package
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ strategy :
11
+ matrix :
12
+ GOOS : ['linux']
13
+ GOARCH : ['amd64', 'arm64', 'arm']
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+ - uses : actions/setup-go@v4
17
+ with :
18
+ go-version : ' >=1.21.0'
19
+ - name : Build
20
+ env :
21
+ GOOS : ${{ matrix.GOOS }}
22
+ GOARCH : ${{ matrix.GOARCH }}
23
+ CGO_ENABLED : 0
24
+ run : go build -trimpath
Original file line number Diff line number Diff line change
1
+ name : Go Lint
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+
7
+ jobs :
8
+ test :
9
+ name : Lint
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout code
13
+ uses : actions/checkout@v3
14
+ - name : Set up Go
15
+ uses : actions/setup-go@v4
16
+ with :
17
+ go-version : ' >=1.21.0'
18
+ - name : Run golangci-lint
19
+ uses : golangci/golangci-lint-action@v3
Original file line number Diff line number Diff line change
1
+ name : goreleaser
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ jobs :
9
+ goreleaser :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout code
13
+ uses : actions/checkout@v3
14
+ - name : Unshallow
15
+ run : git fetch --prune --unshallow
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v4
18
+ with :
19
+ go-version : ' >=1.21.0'
20
+ - name : Run GoReleaser
21
+ uses : goreleaser/goreleaser-action@v4
22
+ with :
23
+ version : latest
24
+ args : release --rm-dist
25
+ env :
26
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Go Test
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+
7
+ jobs :
8
+ test :
9
+ name : Test
10
+ runs-on : ${{ matrix.os }}
11
+ strategy :
12
+ matrix :
13
+ os : [ubuntu-latest]
14
+ steps :
15
+ - name : Checkout code
16
+ uses : actions/checkout@v3
17
+ - name : Set up Go
18
+ uses : actions/setup-go@v4
19
+ with :
20
+ go-version : ' >=1.21.0'
21
+ id : go
22
+ - name : Test
23
+ run : go test -v ./...
Original file line number Diff line number Diff line change
1
+ builds :
2
+ - # First Build
3
+ env :
4
+ - CGO_ENABLED=0
5
+ main : ./cmd/espotad
6
+ ldflags : >-
7
+ -s -w
8
+
9
+ # Set the binary output location to bin/ so archive will comply with Sensu Go Asset structure
10
+ binary : bin/{{ .ProjectName }}
11
+ goos :
12
+ - linux
13
+ goarch :
14
+ - amd64
15
+ - 386
16
+ - arm
17
+ - arm64
18
+ goarm :
19
+ - 5
20
+ - 6
21
+ - 7
22
+ targets :
23
+ - linux_386
24
+ - linux_amd64
25
+ - linux_arm_5
26
+ - linux_arm_6
27
+ - linux_arm_7
28
+ - linux_arm64
29
+
30
+ checksum :
31
+ name_template : " {{ .ProjectName }}_{{ .Version }}_sha512-checksums.txt"
32
+ algorithm : sha512
33
+
34
+ archives :
35
+ - id : tar
36
+ format : tar.gz
37
+ files :
38
+ - LICENSE
39
+ - README.md
You can’t perform that action at this time.
0 commit comments