File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [master]
6+ pull_request :
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Go
17+ uses : actions/setup-go@v5
18+ with :
19+ go-version : " 1.24"
20+
21+ - name : Cache Go modules
22+ uses : actions/cache@v4
23+ with :
24+ path : |
25+ ~/.cache/go-build
26+ ~/go/pkg/mod
27+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.mod', '**/go.sum') }}
28+ restore-keys : |
29+ ${{ runner.os }}-go-
30+
31+ - name : Download dependencies
32+ run : go mod download
33+
34+ - name : Run go vet
35+ run : go vet ./...
36+
37+ - name : Run tests
38+ run : go test ./...
39+
40+ - name : Build
41+ run : go build ./...
42+
43+ - name : Run linter
44+ uses : golangci/golangci-lint-action@v8
45+ with :
46+ version : v2.0.0
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Setup Go
22+ uses : actions/setup-go@v5
23+ with :
24+ go-version : " 1.24"
25+
26+ - name : Run GoReleaser
27+ uses : goreleaser/goreleaser-action@v6
28+ with :
29+ version : v2.0.0
30+ args : release --clean
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ # Compiled binary
2+ nettrace
3+
4+ # Build outputs
5+ dist /
6+ build /
7+ bin /
8+
9+ # Go test artifacts
10+ * .test
11+ * .out
12+ coverage.out
13+
14+ # IDE folders
15+ .vscode /
16+ .idea /
17+
18+ # OS junk
19+ .DS_Store
20+ Thumbs.db
21+
22+ # Local environment files
23+ .env
24+ .env. *
Original file line number Diff line number Diff line change 1+ version : " 2"
2+
3+ run :
4+ timeout : 5m
5+
6+ linters :
7+ enable :
8+ - errcheck
9+ - gosimple
10+ - govet
11+ - ineffassign
12+ - staticcheck
13+ - unused
Original file line number Diff line number Diff line change 1+ version : 2
2+
3+ project_name : nettrace
4+
5+ before :
6+ hooks :
7+ - go mod tidy
8+ - go test ./...
9+
10+ builds :
11+ - id : nettrace
12+ main : ./cmd/nettrace
13+ binary : nettrace
14+ env :
15+ - CGO_ENABLED=0
16+ goos :
17+ - linux
18+ - darwin
19+ - windows
20+ goarch :
21+ - amd64
22+ - arm64
23+ ignore :
24+ - goos : windows
25+ goarch : arm64
26+ ldflags :
27+ - -s -w -X main.version={{.Version}}
28+
29+ archives :
30+ - formats : [tar.gz]
31+ format_overrides :
32+ - goos : windows
33+ formats : [zip]
34+
35+ checksum :
36+ name_template : checksums.txt
37+
38+ changelog :
39+ use : github
40+ sort : asc
You can’t perform that action at this time.
0 commit comments