Skip to content

Commit ae4594d

Browse files
committed
chore: add goreleaser
1 parent 5b6bdd8 commit ae4594d

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Added by goreleaser init:
2+
dist/

.goreleaser.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
# You may remove this if you don't use go modules.
14+
- go mod tidy
15+
# you may remove this if you don't need go generate
16+
- go generate ./...
17+
18+
builds:
19+
- env:
20+
- CGO_ENABLED=0
21+
goos:
22+
- linux
23+
- windows
24+
- darwin
25+
ldflags:
26+
- -s -w -X github.com/museslabs/kyma/cmd.version={{.Version}}
27+
28+
archives:
29+
- formats: [tar.gz]
30+
# this name template makes the OS and Arch compatible with the results of `uname`.
31+
name_template: >-
32+
{{ .ProjectName }}_
33+
{{- title .Os }}_
34+
{{- if eq .Arch "amd64" }}x86_64
35+
{{- else if eq .Arch "386" }}i386
36+
{{- else }}{{ .Arch }}{{ end }}
37+
{{- if .Arm }}v{{ .Arm }}{{ end }}
38+
# use zip for windows archives
39+
format_overrides:
40+
- goos: windows
41+
formats: [zip]
42+
43+
changelog:
44+
sort: asc
45+
filters:
46+
exclude:
47+
- "^docs:"
48+
- "^test:"
49+
50+
release:
51+
footer: >-
52+
53+
---
54+
55+
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).

0 commit comments

Comments
 (0)