Skip to content

Commit 4d15205

Browse files
committed
👷 Init goreleaser config
1 parent a8f8638 commit 4d15205

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ qodana.yaml
1212
*.dll
1313
*.so
1414
*.dylib
15+
*.syso
1516

1617
# Test binary, built with `go test -c`
1718
*.test

.goreleaser.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
4+
# The lines below are called `modelines`. See `:help modeline`
5+
# Feel free to remove those if you don't want/need to use them.
6+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
7+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
8+
9+
version: 2
10+
11+
env:
12+
- MODULE_PATH=github.com/{{ .Env.GITHUB_REPOSITORY }}
13+
14+
before:
15+
hooks:
16+
- go generate ./...
17+
18+
builds:
19+
- id: yutu
20+
env:
21+
- CGO_ENABLED=0
22+
- GO111MODULE=on
23+
goos:
24+
- linux
25+
- windows
26+
- darwin
27+
goarch:
28+
- amd64
29+
- arm64
30+
main: ./main.go
31+
flags:
32+
- -trimpath
33+
- -tags=netgo
34+
ldflags:
35+
- -s -w
36+
- -X {{ .Env.MODULE_PATH }}/cmd.Version={{ .Version }}
37+
- -X {{ .Env.MODULE_PATH }}/cmd.Commit={{ .ShortCommit }}
38+
- -X {{ .Env.MODULE_PATH }}/cmd.CommitDate={{ .CommitDate }}
39+
- -X {{ .Env.MODULE_PATH }}/cmd.Os={{ .Os }}
40+
- -X {{ .Env.MODULE_PATH }}/cmd.Arch={{ .Arch }}
41+
42+
archives:
43+
- format: binary
44+
45+
source:
46+
enabled: true
47+
48+
checksum:
49+
algorithm: blake2b
50+
split: true
51+
ids:
52+
- yutu
53+
- source
54+
55+
changelog:
56+
use: github
57+
sort: ""
58+
abbrev: 0
59+
groups:
60+
- title: "Features"
61+
regexp: "^.*?:sparkles:.+"
62+
order: 0
63+
- title: "Bug Fixes"
64+
regexp: "^.*?:bug:.+"
65+
order: 1
66+
- title: "Documentation"
67+
regexp: "^.*?:memo:.+"
68+
order: 2
69+
- title: "Others"
70+
order: 3
71+
72+
release:
73+
discussion_category_name: General
74+

0 commit comments

Comments
 (0)