-
Notifications
You must be signed in to change notification settings - Fork 27
/
.goreleaser.yml
152 lines (136 loc) · 4.32 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
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
project_name: kink
env:
- GO111MODULE=on
- CGO_ENABLED=0
gomod:
proxy: true
before:
hooks:
- go mod tidy
- go mod download
- ./scripts/completions.sh
builds:
- id: linux-amd64
binary: kink
main: ./main.go
goos:
- linux
goarch:
- amd64
ldflags:
- -s -w -X github.com/Trendyol/kink/cmd.GitVersion={{ .Version }} -X github.com/Trendyol/kink/cmd.gitCommit={{ .ShortCommit }} -X github.com/Trendyol/kink/cmd.buildDate={{ .CommitDate }}
- id: darwin-amd64
binary: kink
main: ./main.go
goos:
- darwin
goarch:
- amd64
ldflags:
- -s -w -X github.com/Trendyol/kink/cmd.GitVersion={{ .Version }} -X github.com/Trendyol/kink/cmd.gitCommit={{ .ShortCommit }} -X github.com/Trendyol/kink/cmd.buildDate={{ .CommitDate }}
- id: darwin-arm64
binary: kink
main: ./main.go
goos:
- darwin
goarch:
- arm64
ldflags:
- -s -w -X github.com/Trendyol/kink/cmd.GitVersion={{ .Version }} -X github.com/Trendyol/kink/cmd.gitCommit={{ .ShortCommit }} -X github.com/Trendyol/kink/cmd.buildDate={{ .CommitDate }}
- id: windows-amd64
binary: kink
main: ./main.go
goos:
- windows
goarch:
- amd64
ldflags:
- -s -w -X github.com/Trendyol/kink/cmd.GitVersion={{ .Version }} -X github.com/Trendyol/kink/cmd.gitCommit={{ .ShortCommit }} -X github.com/Trendyol/kink/cmd.buildDate={{ .CommitDate }}
- -buildmode=exe
signs:
- cmd: cosign
stdin: '{{ .Env.COSIGN_PASSWORD }}'
args: ["sign-blob", "-key=cosign.key", "-output=${signature}", "${artifact}"]
artifacts: checksum
docker_signs:
- artifacts: images
args: [ "sign", "-key=cosign.key", "${artifact}" ]
stdin: '{{ .Env.COSIGN_PASSWORD }}'
dockers:
- image_templates: [ "ghcr.io/trendyol/{{ .ProjectName }}:{{ .Version }}-amd64" ]
dockerfile: Dockerfile.goreleaser
goos: linux
goarch: amd64
use: buildx
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/Trendyol/kink
- --label=org.opencontainers.image.source=https://github.com/Trendyol/kink
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
brews:
- tap:
owner: Trendyol
name: homebrew-trendyol-tap
homepage: https://github.com/trendyol
description: KinK is a helper CLI that facilitates to manage KinD clusters as Kubernetes pods. Designed to ease clusters up for fast testing with batteries included in mind.
license: MIT
test: |
system "#{bin}/kink version"
dependencies:
- name: go
type: optional
- name: git
install: |-
if build.head?
project = "github.com/Trendyol/kink"
ldflags = %W[
-s -w
-X #{project}/cmd.GitVersion=#{Utils.git_branch}
-X #{project}/cmd.gitCommit=#{Utils.git_short_head}
-X #{project}/cmd.gitTreeState=clean
-X #{project}/cmd.buildDate=#{Time.now.utc.iso8601}
]
system "go", "build", *std_go_args(output: "kink", ldflags: ldflags.join(" ")), "main.go"
system "./scripts/completions.sh"
end
bin.install "kink"
bash_completion.install "completions/kink.bash" => "kink"
zsh_completion.install "completions/kink.zsh" => "_kink"
fish_completion.install "completions/kink.fish"
custom_block: |
head "https://github.com/Trendyol/kink.git", branch: "main"
head do
depends_on "go" => :build
end
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
name_template: '{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}'
files:
- completions/*
checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
snapshot:
name_template: SNAPSHOT-{{.ShortCommit}}
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- 'README'
- Merge pull request
- Merge branch
release:
github:
owner: Trendyol
name: kink