Skip to content

Commit 34b45f4

Browse files
authored
feat: create .goreleaser.yaml with default configuration (#123)
Added a new .goreleaser.yaml configuration file with default settings for building and releasing Go applications.
1 parent cb1e77e commit 34b45f4

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.goreleaser.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
before:
12+
hooks:
13+
- go mod tidy
14+
15+
builds:
16+
- env:
17+
- CGO_ENABLED=0
18+
goos:
19+
- linux
20+
- windows
21+
- darwin
22+
23+
archives:
24+
- formats: ["tar.gz"]
25+
# this name template makes the OS and Arch compatible with the results of `uname`.
26+
name_template: >-
27+
{{ .ProjectName }}_
28+
{{- title .Os }}_
29+
{{- if eq .Arch "amd64" }}x86_64
30+
{{- else if eq .Arch "386" }}i386
31+
{{- else }}{{ .Arch }}{{ end }}
32+
{{- if .Arm }}v{{ .Arm }}{{ end }}
33+
# use zip for windows archives
34+
format_overrides:
35+
- goos: windows
36+
formats: ["zip"]
37+
38+
changelog:
39+
sort: asc
40+
filters:
41+
exclude:
42+
- "^docs:"
43+
- "^test:"
44+
45+
release:
46+
prerelease: auto
47+
48+
universal_binaries:
49+
- replace: true

0 commit comments

Comments
 (0)