-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
143 lines (129 loc) · 3.2 KB
/
.goreleaser.yml
File metadata and controls
143 lines (129 loc) · 3.2 KB
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
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
dist: "./dist"
before:
hooks:
- go mod tidy
- go mod download
builds:
- id: mapctf-api
main: ./cmd/api
binary: "mapctf-api-{{ .Os }}-{{ .Arch }}"
no_unique_dist_dir: true
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X main.buildVersion={{.Version}}
- -X main.buildCommit={{.Commit}}
- -X main.buildDate={{.Date}}
- id: mapctf-map
main: ./cmd/map
binary: "mapctf-map-{{ .Os }}-{{ .Arch }}"
no_unique_dist_dir: true
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X main.buildVersion={{.Version}}
- -X main.buildCommit={{.Commit}}
- -X main.buildDate={{.Date}}
archives:
- id: mapctf
allow_different_binary_count: true
name_template: >-
{{ .ProjectName }}-
{{- title .Os }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
formats: ["zip"]
ids:
- mapctf-api
- mapctf-map
checksum:
name_template: "checksums.txt"
snapshot: {}
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^ci:"
- Merge pull request
- Merge branch
dockers:
- image_templates:
- "{{ .Env.DOCKER_HUB_ORG }}/mapctf-api:{{ .Version }}"
- "{{ .Env.DOCKER_HUB_ORG }}/mapctf-api:latest"
dockerfile: deploy/cicd/docker/Dockerfile-mapctf-api
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--platform=linux/arm64"
extra_files:
- mapctf-api-linux-amd64
- mapctf-api-linux-arm64
- image_templates:
- "{{ .Env.DOCKER_HUB_ORG }}/mapctf-map:{{ .Version }}"
- "{{ .Env.DOCKER_HUB_ORG }}/mapctf-map:latest"
dockerfile: deploy/cicd/docker/Dockerfile-mapctf-map
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--platform=linux/arm64"
extra_files:
- mapctf-map-linux-amd64
- mapctf-map-linux-arm64
nfpms:
- id: mapctf-api
maintainer: jmpsec/mapctf
description: mapctf API component
homepage: https://github.com/jmpsec/mapctf
license: GPL-3.0
formats:
- deb
bindir: /opt/mapctf/bin
contents:
- src: ./dist/mapctf-api-{{ .Os }}-{{ .Arch }}
dst: /opt/mapctf/bin/mapctf-api
overrides:
deb:
scripts:
postinstall: deploy/cicd/deb/post-install.sh
preremove: deploy/cicd/deb/pre-remove.sh
- id: mapctf-map
maintainer: jmpsec/mapctf
description: mapctf Map component
homepage: https://github.com/jmpsec/mapctf
license: GPL-3.0
formats:
- deb
bindir: /opt/mapctf/bin
contents:
- src: ./dist/mapctf-map-{{ .Os }}-{{ .Arch }}
dst: /opt/mapctf/bin/mapctf-map
overrides:
deb:
scripts:
postinstall: deploy/cicd/deb/post-install.sh
preremove: deploy/cicd/deb/pre-remove.sh
release:
draft: false
prerelease: false