-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
121 lines (106 loc) · 4.53 KB
/
.goreleaser.yml
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
# This is a .goreleaser.yml file which configures the behaviour for GoReleaser
# Make sure to check the documentation at http://goreleaser.com
# The project name is used in the name of the Brew formula, archives, etc.
# If none is given, it will be inferred from the name of the GitHub, GitLab, or Gitea release.
# https://goreleaser.com/customization/project/
project_name: mud
# https://goreleaser.com/customization/build/
builds:
- id: mud
# Path to project's (sub)directory containing Go code.
# This is the working directory for the Go build command(s).
# Default is `.`.
dir: .
# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
#binary: 'mud_{{.Tag}}_{{replace .Target "darwin" "macos"}}'
binary: 'mud-{{ .Tag }}-{{replace .Target "_" "-"}}'
# Custom environment variables to be set during the builds.
# Default is empty.
env:
- CGO_ENABLED=0
# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386, amd64 and arm64.
goarch:
- amd64
# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin and linux.
goos:
- linux
- windows
- darwin
# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
# .XXX variables come from GoReleaser name templates, see https://goreleaser.com/customization/templates/
#ldflags:
# - -s -w -X main.version={{.Tag}} -X main.date={{.Date}} -X main.goVersion={{.Env.GO_VERSION}} -X main.platform={{.Os}}/{{.Arch}} -X main.commit={{.Commit}}
hooks:
post:
#- upx "{{ .Path }}"
- sh -c "cosign sign-blob -key $COSIGN_KEY_LOCATION {{ .Path }} > dist/mud-{{ .Tag }}-{{replace .Target "_" "-"}}.sig"
# The binaries built will be archived together with the README and LICENSE files into a tar.gz file.
# In the archives section you can customize the archive name, additional files, and format.
# https://goreleaser.com/customization/archive/
archives:
- id: mud
# Builds reference which build instances should be archived in this archive.
builds:
- mud
# Archive format. Valid options are `tar.gz`, `tar.xz`, `gz`, `zip` and `binary`.
# If format is `binary`, no archives are created and the binaries are instead
# uploaded directly.
# Default is `tar.gz`.
format: binary
# Archive name template.
# Defaults:
# - if format is `tar.gz`, `tar.xz`, `gz` or `zip`:
# - `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}`
# - if format is `binary`:
# - `{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}`
name_template: "{{.Binary}}"
# Replacements for GOOS and GOARCH in the archive name.
# Keys should be valid GOOSs or GOARCHs.
# Values are the respective replacements.
# Default is empty.
#replacements:
# darwin: macos
# You may add the current tag source archive to the release as well.
# This is particularly useful if you want to sign it, for example.
# https://goreleaser.com/customization/source/
source:
# Whether this pipe is enabled or not.
# Defaults to `false`
enabled: false
# Name template of the final archive.
# Defaults to `{{ .ProjectName }}-{{ .Version }}`
name_template: '{{.ProjectName}}_{{.Tag}}'
# Format of the archive.
# Any format git-archive supports, this supports too.
# Defaults to `tar.gz`
format: 'zip'
# GoReleaser can create a GitHub/GitLab/Gitea release with the current tag, upload all the artifacts and generate the changelog based on the new commits since the previous tag.
# https://goreleaser.com/customization/release/
release:
# You can change the name of the release.
# Default is `{{.Tag}}`
# .XXX variables come from GoReleaser name templates, see https://goreleaser.com/customization/templates/
name_template: "{{.ProjectName}}-{{.Tag}}"
extra_files:
- glob: dist/*.sig
# https://goreleaser.com/customization/checksum/
checksum:
name_template: 'checksums.txt'
# https://goreleaser.com/customization/snapshots/
snapshot:
name_template: "{{.Tag}}-next"
# https://goreleaser.com/customization/release/#customize-the-changelog
changelog:
skip: true
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'