generated from AndreasAugustin/template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
198 lines (174 loc) · 6.12 KB
/
.goreleaser.yaml
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# Make sure to check the documentation at https://goreleaser.com
project_name: go-gitmoji-cli
before:
hooks:
- go mod tidy
- rm -rf completions
- mkdir completions
- rm -rf manpages
- mkdir manpages
- sh -c 'go run . completion "bash" >./completions/{{ .ProjectName }}.bash'
- sh -c 'go run . completion "zsh" >./completions/{{ .ProjectName }}.zsh'
- sh -c 'go run . completion "fish" >./completions/{{ .ProjectName }}.fish'
- sh -c 'go run . man | gzip -c >./manpages/{{ .ProjectName }}.1.gz'
#gomod:
# proxy: true
builds:
- binary: "{{ .ProjectName }}"
env:
- CGO_ENABLED=0
main: "."
ldflags: -s -w -X github.com/AndreasAugustin/go-gitmoji-cli/pkg.Version=v{{ .Version }} -X github.com/AndreasAugustin/go-gitmoji-cli/pkg.CommitSHA={{ .Commit }} -X github.com/AndreasAugustin/go-gitmoji-cli/pkg.CommitDate={{ .CommitDate }}
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- "386"
- arm
goarm:
- "7"
ignore:
- goos: windows
goarch: arm64
- goos: windows
goarm: "7"
archives:
- format_overrides:
- goos: windows
format: zip
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
files:
- README*
- LICENSE*
- manpages/*
- completions/*
checksum:
name_template: 'checksums.txt'
source:
enabled: true
sboms:
- artifacts: archive
- id: source
artifacts: source
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
use: github
filters:
exclude:
- '^docs:'
- '^test:'
release:
prerelease: auto
dockers:
- image_templates:
- "docker.io/andyaugustin/{{ .ProjectName }}:v{{ .Version }}-amd64"
- "ghcr.io/andreasaugustin/{{ .ProjectName }}:v{{ .Version }}-amd64"
goarch: amd64
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description=CLI tool for managing conventional commits with gitmoji
- --label=org.opencontainers.image.source={{ .GitURL }}
- --label=org.opencontainers.image.version=v{{ .Version }}
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
dockerfile: release.Dockerfile
skip_push: false
# use: buildx
aurs:
- name: "{{ .ProjectName }}-bin"
homepage: "https://github.com/AndreasAugustin/go-gitmoji-cli"
description: "CLI supporting gitmoji with conventional commits"
maintainers:
- 'Andreas Augustin <dev@andreas-augustin.org>'
contributors:
- 'Andreas Augustin <dev@andreas-augustin.org>'
license: "MIT"
private_key: '{{ .Env.AUR_KEY }}'
git_url: "ssh://aur@aur.archlinux.org/{{ .ProjectName }}-bin.git"
depends:
- git
package: |-
# bin
install -Dm755 "./{{ .ProjectName }}" "${pkgdir}/usr/bin/{{ .ProjectName }}"
# license
mkdir -p "${pkgdir}/usr/share/licenses/{{ .ProjectName }}/"
install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/{{ .ProjectName }}/"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./completions/{{ .ProjectName }}.bash" "${pkgdir}/usr/share/bash-completion/completions/{{ .ProjectName }}"
install -Dm644 "./completions/{{ .ProjectName }}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_{{ .ProjectName }}"
install -Dm644 "./completions/{{ .ProjectName }}.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/{{ .ProjectName }}.fish"
# man pages
install -Dm644 "./manpages/{{ .ProjectName }}.1.gz" "${pkgdir}/usr/share/man/man1/{{ .ProjectName }}.1.gz"
skip_upload: false
brews:
- repository:
owner: "AndreasAugustin"
name: go-gitmoji-cli
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
branch: homebrew-tap
pull_request:
enabled: true
base:
owner: "AndreasAugustin"
name: go-gitmoji-cli
branch: main
commit_author:
name: "Andy Augustin"
email: "dev@andreas-augustin.org"
homepage: "https://github.com/AndreasAugustin/go-gitmoji-cli"
description: "CLI for managing commits gitmoji and conventional commits format"
dependencies:
- name: git
install: |-
bin.install "{{ .ProjectName }}"
bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
fish_completion.install "completions/{{ .ProjectName }}.fish"
man1.install "manpages/{{ .ProjectName }}.1.gz"
directory: Formula
license: "MIT"
skip_upload: false
nfpms:
- vendor: AndreasAugustin
homepage: "https://github.com/AndreasAugustin/go-gitmoji-cli"
maintainer: 'Andreas Augustin <dev@andreas-augustin.org>'
description: "CLI supporting gitmoji with conventional commits"
file_name_template: "{{ .ConventionalFileName }}"
license: MIT
formats:
- apk
- deb
- rpm
contents:
- src: ./completions/{{ .ProjectName }}.bash
dst: /etc/bash_completion.d/{{ .ProjectName }}
- src: ./completions/{{ .ProjectName }}.fish
dst: /usr/share/fish/vendor_completions.d/{{ .ProjectName }}.fish
- src: ./completions/{{ .ProjectName }}.zsh
dst: /usr/share/zsh/site-functions/_{{ .ProjectName }}
- src: ./manpages/{{ .ProjectName }}.1.gz
dst: /usr/share/man/man1/{{ .ProjectName }}.1.gz
dependencies:
- git
rpm:
signature:
key_file: '{{ if ne (index .Env "NFPM_GPG_KEY_PATH") "" }}{{ .Env.NFPM_GPG_KEY_PATH }}{{ else }}{{ end }}'
deb:
signature:
key_file: '{{ if ne (index .Env "NFPM_GPG_KEY_PATH") "" }}{{ .Env.NFPM_GPG_KEY_PATH }}{{ else }}{{ end }}'