Add GoReleaser configuration, CI workflows, and contributing guidelines; update .gitignore and Makefile

This commit is contained in:
JY Tan
2025-12-18 16:45:12 -08:00
parent accce04769
commit 55230dd774
9 changed files with 689 additions and 3 deletions

83
.goreleaser.yaml Normal file
View File

@@ -0,0 +1,83 @@
version: 2
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.buildTime={{.Date}}
- -X main.gitCommit={{.Commit}}
binary: fence
main: ./cmd/fence
archives:
- formats: [tar.gz]
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- README.md
- LICENSE
- ARCHITECTURE.md
- CONTRIBUTING.md
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
use: github
format: "{{ .SHA }}: {{ .Message }}{{ with .AuthorUsername }} (@{{ . }}){{ end }}"
filters:
exclude:
- "^test:"
- "^test\\("
- "^chore: update$"
- "^chore: docs$"
- "^docs: update$"
- "^chore: typo$"
- "^chore\\(deps\\): "
- "^(build|ci): "
- "merge conflict"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: "New Features"
regexp: '^.*?feat(\(.+\))??!?:.+$'
order: 100
- title: "Security updates"
regexp: '^.*?sec(\(.+\))??!?:.+$'
order: 150
- title: "Bug fixes"
regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
order: 200
- title: "Documentation updates"
regexp: ^.*?docs?(\(.+\))??!?:.+$
order: 400
- title: Other work
order: 9999
release:
github:
owner: Use-Tusk
name: fence
draft: false
prerelease: auto