-
-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
115 lines (100 loc) · 2.65 KB
/
Copy path.goreleaser.yaml
File metadata and controls
115 lines (100 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
project_name: yutu
env:
- MODULE_PATH=github.com/{{ if index .Env "GITHUB_REPOSITORY" }}{{ .Env.GITHUB_REPOSITORY }}{{ else }}eat-pray-ai/yutu{{ end }}
- Builder={{ if index .Env "GITHUB_ACTOR" }}{{ .Env.GITHUB_ACTOR }}{{ else }}Gopher{{ end }}
before:
hooks:
- go mod tidy
- go generate ./...
gomod:
proxy: true
report_sizes: true
metadata:
mod_timestamp: "{{ .CommitTimestamp }}"
builds:
- id: yutu
binary: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
env:
- CGO_ENABLED=0
- GO111MODULE=on
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
goamd64:
- v1
goarm64:
- v8.0
flags:
- -trimpath
- -tags=netgo
ldflags:
- -s -w
- -X {{ .Env.MODULE_PATH }}/cmd.Version={{ .Version }}
- -X {{ .Env.MODULE_PATH }}/cmd.Commit={{ .ShortCommit }}
- -X {{ .Env.MODULE_PATH }}/cmd.CommitDate={{ .CommitDate }}
- -X {{ .Env.MODULE_PATH }}/cmd.Os={{ .Os }}
- -X {{ .Env.MODULE_PATH }}/cmd.Arch={{ .Arch }}
- -X {{ .Env.MODULE_PATH }}/cmd.Builder={{ .Env.Builder }}
mod_timestamp: "{{ .CommitTimestamp }}"
archives:
- formats: [ "binary" ]
ids:
- yutu
name_template: "{{ .Binary }}"
source:
enabled: true
name_template: "{{ .ProjectName }}"
checksum:
algorithm: blake2b
split: true
ids:
- source
changelog:
use: github
sort: ""
abbrev: 0
groups:
- title: "Features"
regexp: "^.*?:(boom|sparkles|art|zap|recycle|wheelchair|children_crossing):.+"
order: 0
- title: "Bug Fixes and Tests"
regexp: "^.*?:(bug|ambulance|white_check_mark|lock|rotating_light|pencil2):.+"
order: 1
- title: "Documentation"
regexp: "^.*?:memo:.+"
order: 2
- title: "CI/CD"
regexp: "^.*?:(green_heart|construction_worker|rocket):.+"
order: 3
- title: "Others"
order: 999
filters:
exclude:
- "^.*?:arrow_up:.+"
release:
replace_existing_draft: true
discussion_category_name: General
prerelease: auto
make_latest: "{{ if .Prerelease }}false{{ else }}true{{ end }}"
header: |
## Install
```shell
npm i -g @eat-pray-ai/yutu@{{ .Version }}
```
#git:
# ignore_tags:
# - ".*-rc.*"
# - ".*-beta.*"
# - ".*-alpha.*"
# - ".*-dev.*"