-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
152 lines (124 loc) · 4.9 KB
/
.goreleaser.yaml
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Make sure to check the documentation at https://goreleaser.com
project_name: goreleaser-aws-lambda-example
env:
- CGO_ENABLED=0
- GITHUB_RUN_ATTEMPT={{- if .Env.GITHUB_RUN_ATTEMPT }}{{ .Env.GITHUB_RUN_ATTEMPT }}{{- else }}0{{- end }}
- S3_BUCKET={{- if .Env.S3_BUCKET }}{{ .Env.S3_BUCKET }}{{- else }}goreleaser-s3-bucket{{- end }}
builds:
# You can have multiple builds defined as a yaml list
-
# ID of the build. Defaults to the binary name.
id: "build"
# Custom environment variables to be set during the builds.
# Default: `os.Environ()` merged with what you set the root `env` section.
env:
- CGO_ENABLED=0
# GOOS list to build for. For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin, linux, and windows.
goos:
- linux
# GOARCH to build for. For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386, amd64 and arm64.
goarch:
- amd64
archives:
-
# ID of this archive. Defaults to `default`.
id: archive
# Builds reference which build instances should be archived in this archive.
# Default is empty, which includes all builds.
builds:
- build
# Archive format. Valid options are `tar.gz`, `tar.xz`, `tar`, `gz`, `zip` and `binary`.
format: zip
# Archive name template.
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64_
{{- else if eq .Arch "amd64_v1" }}x86_64_
{{- else if eq .Arch "386" }}i386_
{{- else }}{{ .Arch }}_{{- end }}
{{- if .Arm }}v{{ .Arm }}_{{- end }}
{{- if .Version }}v{{ .Version }}{{- end }}
{{- if .Env.GITHUB_RUN_ATTEMPT }}-{{ .Env.GITHUB_RUN_ATTEMPT }}{{- end }}
# Set this to true if you want all files in the archive to be in a single directory.
# wrap_in_directory: true
# If set to true, will strip the parent directories away from binary files and flatten the directories within the archive.
# strip_parent_binary_folder: true
# Additional files/template/globs you want to add to the archive.
# Defaults are any files matching `LICENSE*`, `README*`, `CHANGELOG*`, `license*`, `readme*` and `changelog*`.
# files:
# - none*
# Disables the binary count check. Default: false
# allow_different_binary_count: true
# This will make the destination paths be relative to the longest common path prefix between all the files matched and the source glob.
# rlcp: true
release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL or empty if its private hosted.
github:
owner: GeorgeDavis-TriumphTech
name: goreleaser-aws-lambda-example
# You can change the name of the release.
# Default is `{{.Tag}}` on OSS and `{{.PrefixedTag}}` on Pro.
name_template: "{{.ProjectName}}-v{{.Version}}"
ids:
- archive
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
# Default is false.
prerelease: auto
# What to do with the release notes in case there the release already exists.
#
# Valid options are:
# - `keep-existing`: keep the existing notes
# - `append`: append the current release notes to the existing notes
# - `prepend`: prepend the current release notes to the existing notes
# - `replace`: replace existing notes
#
# Default is `keep-existing`.
mode: prepend
# Header template for the release body.
header: |
## Release v{{.Version}}{{- if .Env.GITHUB_RUN_ATTEMPT }}-{{ .Env.GITHUB_RUN_ATTEMPT }}{{- end }} ({{ .Date }})
Here is a summary of all the new changes in this new release.
# Footer template for the release body.
footer: |
## Credits
Thank you for your contribution.
blobs:
-
provider: s3
bucket: "{{ .Env.S3_BUCKET }}"
# IDs of the artifacts you want to upload.
ids:
- archive
# Template for the path/name inside the bucket.
# Default is `{{ .ProjectName }}/{{ .Tag }}`
folder: "{{ .ProjectName }}/v{{ .Version }}-{{ .Env.GITHUB_RUN_ATTEMPT }}"
checksum:
name_template: checksums_v{{ .Version }}{{- if .Env.GITHUB_RUN_ATTEMPT }}-{{ .Env.GITHUB_RUN_ATTEMPT }}{{- end }}.txt
changelog:
sort: asc
# Group commits messages by given regex and title.
groups:
- title: Features
regexp: '^.*?(feat|refactor)(\([[:word:]]+\))??!?:.+$'
order: 0
- title: 'Bug fixes'
regexp: '^.*?(bug|fix)(\([[:word:]]+\))??!?:.+$'
order: 1
- title: DevOps
regexp: '^.*?(ci|build|devops)(\([[:word:]]+\))??!?:.+$'
order: 90
- title: Docs
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 95
- title: Others
order: 100
filters:
exclude:
- '^test:'