File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,18 +122,13 @@ ENTRYPOINT ["./{{ .Name }}ctl"]
122122}
123123
124124func GoReleaser () []byte {
125- return []byte (`env:
126- - IMAGE_TAG={{.Tag}}
127-
128-
125+ return []byte (`version: 2
129126project_name: [% .Name %]ctl
130127
131128builds:
132- - ldflags: "-extldflags= -w -X '[% .Module %]/cmd.Version={{.Tag}}'"
133- flags:
134- - -mod=vendor
135- env:
136- - "CGO_ENABLED=0"
129+ - env:
130+ - CGO_ENABLED=0
131+ - IMAGE_TAG={{.Tag}}
137132 - "GO111MODULE=on"
138133 goos:
139134 - linux
@@ -142,8 +137,38 @@ builds:
142137 goarch:
143138 - amd64
144139 - arm64
145- source:
146- enabled: true
140+ ldflags: "-extldflags= -w -X 'github.com/SencilloDev/[% .Name %]/cmd.Version={{.Tag}}'"
141+ flags:
142+ - -mod=vendor
143+
144+ archives:
145+ - formats: [binary]
146+ name_template: >-
147+ {{ .ProjectName }}_
148+ {{- title .Os }}_
149+ {{- if eq .Arch "amd64" }}x86_64
150+ {{- else if eq .Arch "386" }}i386
151+ {{- else }}{{ .Arch }}{{ end }}
152+ {{- if .Arm }}v{{ .Arm }}{{ end }}
153+ # use zip for windows archives
154+ format_overrides:
155+ - goos: windows
156+ formats: [binary]
157+
158+ changelog:
159+ sort: asc
160+ filters:
161+ exclude:
162+ - "^docs:"
163+ - "^test:"
164+
165+ release:
166+ footer: >-
167+
168+ ---
169+
170+ Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
171+
147172` )
148173}
149174
You can’t perform that action at this time.
0 commit comments