Skip to content

Commit

Permalink
feat(ci): setup goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
NX-Official committed Jul 30, 2024
1 parent 489957d commit 5d8f2bf
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.DS_Store
logs
*.log
.ssh
.ssh
dist/
61 changes: 61 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

version: 2
env:
- GO111MODULE=on
builds:
- env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w
- -X {{ .ModulePath }}/pkg/consts.Version={{ .Version }}
- -X {{ .ModulePath }}/pkg/consts.Commit={{ .ShortCommit }}
- -X {{ .ModulePath }}/pkg/consts.CommitDate={{ .CommitDate }}
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- linux
- windows
- darwin
goarch:
- "386"
- amd64
- arm
- arm64
- riscv64
- loong64
goarm:
- "5"
- "6"
- "7"
checksum:
name_template: '{{ .ProjectName }}_checksums.txt'
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
format_overrides:
- goos: windows
format: zip
files:
- README*.md
changelog:
use: github
sort: asc
groups:
- title: New Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: 'Documentation updates'
regexp: "^.*doc[(\\w)]*:+.*$"
order: 2
- title: 'Refactoring'
regexp: "^.*refactor[(\\w)]*:+.*$"
order: 3
- title: Others
order: 4
release:
draft: true

0 comments on commit 5d8f2bf

Please sign in to comment.