-
Notifications
You must be signed in to change notification settings - Fork 10
/
.goreleaser.yaml
192 lines (192 loc) · 6.87 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
version: 2
project_name: ascii-movie
before:
hooks:
- go run ./internal/generate/gzip
- go run ./internal/generate/completions
- go run ./internal/generate/manpages --version='{{ .Version }}' --date='{{ .CommitDate }}'
builds:
- env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s
- -w
- -X main.version={{ .Version }}
tags:
- gzip
goarch:
- amd64
- arm
- arm64
goarm:
- "7"
archives:
- format: tar.gz
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- manpages/*
- completions/*
- system/config/*
checksum:
name_template: "checksums.txt"
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs'
- '^test'
groups:
- title: Features
order: 0
regexp: "(feat)"
- title: Fixes
order: 1
regexp: "(fix|perf)"
- title: Others
order: 999
brews:
- homepage: https://github.com/gabe565/ascii-movie
description: Star Wars SSH + Telnet server written in Go
license: GPL-3.0
repository:
owner: gabe565
name: homebrew-tap
directory: Formula
install: |
bin.install "{{ .ProjectName }}"
man1.install "manpages/{{ .ProjectName }}.1.gz"
man1.install "manpages/{{ .ProjectName }}-get.1.gz"
man1.install "manpages/{{ .ProjectName }}-get-stream.1.gz"
man1.install "manpages/{{ .ProjectName }}-ls.1.gz"
man1.install "manpages/{{ .ProjectName }}-play.1.gz"
man1.install "manpages/{{ .ProjectName }}-serve.1.gz"
bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
fish_completion.install "completions/{{ .ProjectName }}.fish"
dockers:
- &dockers
image_templates:
- ghcr.io/gabe565/{{ .ProjectName }}:{{ .Version }}-amd64
use: buildx
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/amd64"
- <<: *dockers
image_templates:
- ghcr.io/gabe565/{{ .ProjectName }}:{{ .Version }}-armv7
goarch: arm
goarm: 7
build_flag_templates:
- "--platform=linux/arm/v7"
- <<: *dockers
image_templates:
- ghcr.io/gabe565/{{ .ProjectName }}:{{ .Version }}-arm64v8
goarch: arm64
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
- &docker_manifests
name_template: ghcr.io/gabe565/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/gabe565/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/gabe565/{{ .ProjectName }}:{{ .Version }}-armv7
- ghcr.io/gabe565/{{ .ProjectName }}:{{ .Version }}-arm64v8
- <<: *docker_manifests
name_template: ghcr.io/gabe565/{{ .ProjectName }}:{{ .Version }}
- <<: *docker_manifests
name_template: ghcr.io/gabe565/{{ .ProjectName }}:{{ .Major }}
- <<: *docker_manifests
name_template: ghcr.io/gabe565/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}
nfpms:
- id: packages
vendor: Gabe Cook
homepage: https://github.com/gabe565/ascii-movie
description: Star Wars SSH + Telnet server written in Go
license: GPL-3.0
maintainer: Gabe Cook <[email protected]>
formats:
- deb
- rpm
contents:
- src: ./manpages/
dst: /usr/share/man/man1
file_info:
mode: 0644
- src: ./completions/{{ .ProjectName }}.bash
dst: /usr/share/bash-completion/completions/{{ .ProjectName }}
file_info:
mode: 0644
- src: ./completions/{{ .ProjectName }}.fish
dst: /usr/share/fish/vendor_completions.d/{{ .ProjectName }}.fish
file_info:
mode: 0644
- src: ./completions/{{ .ProjectName }}.zsh
dst: /usr/share/zsh/vendor-completions/_{{ .ProjectName }}
file_info:
mode: 0644
- src: ./system/config/sysusers.conf
dst: /usr/lib/sysusers.d/{{ .ProjectName }}.conf
- src: ./system/config/tmpfiles.conf
dst: /usr/lib/tmpfiles.d/{{ .ProjectName }}.conf
- src: ./system/config/{{ .ProjectName }}.service
dst: /usr/lib/systemd/system/{{ .ProjectName }}.service
type: config
packager: rpm
- src: ./system/config/{{ .ProjectName }}.service
dst: /lib/systemd/system/{{ .ProjectName }}.service
type: config
packager: deb
overrides:
deb:
scripts:
postinstall: system/scripts/deb-postinstall.sh
publishers:
- name: fury.io
ids:
- packages
dir: "{{ dir .ArtifactPath }}"
cmd: curl -sf -Fpackage=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/gabe565/
aurs:
- name: "{{ .ProjectName }}-bin"
homepage: https://github.com/gabe565/ascii-movie
description: Star Wars SSH + Telnet server written in Go
maintainers:
- Gabe Cook <[email protected]>
license: GPL-3.0
private_key: '{{ .Env.AUR_SSH_KEY }}'
git_url: ssh://[email protected]/{{ .ProjectName }}-bin.git
skip_upload: auto
package: |-
# bin
install -Dm755 "./{{ .ProjectName }}" "${pkgdir}/usr/bin/{{ .ProjectName }}"
# license
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/{{ .ProjectName }}/LICENSE"
# man page
install -Dm644 "./manpages/{{ .ProjectName }}.1.gz" "${pkgdir}/usr/share/man/man1/{{ .ProjectName }}.1.gz"
install -Dm644 "./manpages/{{ .ProjectName }}-get.1.gz" "${pkgdir}/usr/share/man/man1/{{ .ProjectName }}-get.1.gz"
install -Dm644 "./manpages/{{ .ProjectName }}-get-stream.1.gz" "${pkgdir}/usr/share/man/man1/{{ .ProjectName }}-get-stream.1.gz"
install -Dm644 "./manpages/{{ .ProjectName }}-ls.1.gz" "${pkgdir}/usr/share/man/man1/{{ .ProjectName }}-ls.1.gz"
install -Dm644 "./manpages/{{ .ProjectName }}-play.1.gz" "${pkgdir}/usr/share/man/man1/{{ .ProjectName }}-play.1.gz"
install -Dm644 "./manpages/{{ .ProjectName }}-serve.1.gz" "${pkgdir}/usr/share/man/man1/{{ .ProjectName }}-serve.1.gz"
# completion
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"
# user
install -Dm644 "./system/config/sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/{{ .ProjectName }}.conf"
# homedir
install -Dm644 "./system/config/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/{{ .ProjectName }}.conf"
# systemd unit
install -Dm644 "./system/config/{{ .ProjectName }}.service" "${pkgdir}/usr/lib/systemd/system/{{ .ProjectName }}.service"
commit_author:
name: goreleaserbot
email: [email protected]