Skip to content

Commit df8a8d1

Browse files
committed
feat(add): initial version
0 parents  commit df8a8d1

File tree

24 files changed

+2178
-0
lines changed

24 files changed

+2178
-0
lines changed

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- develop
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Golangci-lint
19+
uses: golangci/[email protected]

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
# It will be triggered when a new tag starting with 'v' is pushed
7+
# v1.0.0, v1.0.1, ...
8+
- 'v*'
9+
10+
permissions:
11+
contents: write
12+
packages: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-22.04
17+
steps:
18+
-
19+
name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
-
24+
name: Set up Go
25+
uses: actions/setup-go@v5
26+
with:
27+
go-version: 1.23.1
28+
-
29+
name: Run GoReleaser
30+
uses: goreleaser/goreleaser-action@v6
31+
with:
32+
distribution: goreleaser
33+
version: '~> v2'
34+
args: release --clean
35+
env:
36+
# Pass the GitHub token to GoReleaser
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
# Pass the registry and image name to GoReleaser
39+
KO_DOCKER_REPO: ghcr.io/bluewave-labs/capture

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# If you prefer the allow list template instead of the deny list, see community template:
2+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3+
#
4+
# Binaries for programs and plugins
5+
*.exe
6+
*.exe~
7+
*.dll
8+
*.so
9+
*.dylib
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Output of the go coverage tool, specifically when used with LiteIDE
15+
*.out
16+
17+
# Dependency directories (remove the comment below to include it)
18+
# vendor/
19+
20+
# Go workspace file
21+
go.work
22+
go.work.sum
23+
24+
# env file
25+
.env
26+
.idea
27+
dist

.golangci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
run:
2+
timeout: 1m
3+
4+
linters:
5+
disable-all: true
6+
enable:
7+
- asciicheck
8+
- bodyclose
9+
- dogsled
10+
- errcheck
11+
- errorlint
12+
- exhaustive
13+
- gocyclo
14+
- goimports
15+
- goprintffuncname
16+
- gosec
17+
- gosimple
18+
- govet
19+
- ineffassign
20+
- misspell
21+
- nakedret
22+
- prealloc
23+
- revive
24+
- staticcheck
25+
- stylecheck
26+
- unconvert
27+
- unused
28+
- whitespace

.goreleaser.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
version: 2
2+
project_name: syscapture
3+
4+
builds:
5+
- id: syscapture
6+
main: ./cmd/syscapture
7+
ldflags:
8+
- -s -w
9+
- -extldflags "-static"
10+
- -X "main.Version={{.Version}}"
11+
env:
12+
- CGO_ENABLED=0
13+
goos:
14+
- linux
15+
- windows
16+
- darwin
17+
goarch:
18+
- amd64
19+
- arm64
20+
- 386
21+
ignore:
22+
# Ignore the arm64 build on windows
23+
- goos: windows
24+
goarch: arm64
25+
26+
kos:
27+
- id: syscapture
28+
platforms:
29+
- linux/amd64
30+
- linux/arm64
31+
- windows/amd64
32+
- windows/386
33+
- darwin/amd64
34+
- darwin/arm64
35+
tags:
36+
- latest
37+
- '{{.Tag}}'
38+
main: ./cmd/syscapture
39+
flags:
40+
- -trimpath
41+
ldflags:
42+
- -s -w
43+
- -extldflags "-static"
44+
- -X "main.Version={{.Version}}"
45+
creation_time: "{{.CommitTimestamp}}"
46+
sbom: spdx
47+
env:
48+
- CGO_ENABLED=0
49+
bare: true
50+
51+
archives:
52+
- format: tar.gz
53+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
54+
format_overrides:
55+
- goos: windows
56+
format: zip
57+
58+
checksum:
59+
# Generate checksum files to confirm the integrity of the files.
60+
# `sha256sum <file>`
61+
name_template: 'checksums.txt'
62+
algorithm: sha256
63+
64+
changelog:
65+
sort: asc
66+
filters:
67+
exclude:
68+
- '^docs:'
69+
- '^test:'

0 commit comments

Comments
 (0)