-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
167 lines (145 loc) · 5.48 KB
/
.goreleaser.yml
File metadata and controls
167 lines (145 loc) · 5.48 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# .goreleaser.yml for cisco-wnc-exporter
project_name: cisco-wnc-exporter
version: 2
# Distribution directory
dist: tmp/dist
# Build destination
github_urls:
# set to true if you use a self-signed certificate
skip_tls_verify: false
before:
hooks:
- go mod tidy
- go mod verify
builds:
- main: cmd/main.go
id: cisco-wnc-exporter
binary: cisco-wnc-exporter
targets:
- linux_amd64
- linux_arm64
- darwin_amd64
- darwin_arm64
- windows_amd64
ldflags:
- -s -w -X 'github.com/umatare5/cisco-wnc-exporter/internal/cli.version={{ .Version }}'
archives:
- name_template: "{{ .ProjectName }}-v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
files:
- "*.go"
- "*.md"
- "go.mod"
- "go.sum"
- "LICENSE"
# Docker configuration
dockers:
- image_templates:
- "ghcr.io/umatare5/cisco-wnc-exporter:latest-amd64"
- "ghcr.io/umatare5/cisco-wnc-exporter:{{ .Tag }}-amd64"
- "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}-amd64"
- "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}.{{ .Minor }}-amd64"
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.description=Prometheus Exporter for Cisco WNC"
- "--label=org.opencontainers.image.url=https://github.com/umatare5/cisco-wnc-exporter"
- "--label=org.opencontainers.image.source=https://github.com/umatare5/cisco-wnc-exporter"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.licenses=MIT"
goarch: amd64
ids:
- cisco-wnc-exporter
- image_templates:
- "ghcr.io/umatare5/cisco-wnc-exporter:latest-arm64"
- "ghcr.io/umatare5/cisco-wnc-exporter:{{ .Tag }}-arm64"
- "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}-arm64"
- "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}.{{ .Minor }}-arm64"
use: buildx
build_flag_templates:
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.description=Prometheus Exporter for Cisco WNC"
- "--label=org.opencontainers.image.url=https://github.com/umatare5/cisco-wnc-exporter"
- "--label=org.opencontainers.image.source=https://github.com/umatare5/cisco-wnc-exporter"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.licenses=MIT"
goarch: arm64
ids:
- cisco-wnc-exporter
# Docker manifest for multi-platform images
docker_manifests:
- name_template: "ghcr.io/umatare5/cisco-wnc-exporter:latest"
image_templates:
- "ghcr.io/umatare5/cisco-wnc-exporter:latest-amd64"
- "ghcr.io/umatare5/cisco-wnc-exporter:latest-arm64"
- name_template: "ghcr.io/umatare5/cisco-wnc-exporter:{{ .Tag }}"
image_templates:
- "ghcr.io/umatare5/cisco-wnc-exporter:{{ .Tag }}-amd64"
- "ghcr.io/umatare5/cisco-wnc-exporter:{{ .Tag }}-arm64"
- name_template: "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}"
image_templates:
- "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}-amd64"
- "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}-arm64"
- name_template: "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}.{{ .Minor }}-amd64"
- "ghcr.io/umatare5/cisco-wnc-exporter:v{{ .Major }}.{{ .Minor }}-arm64"
release:
prerelease: auto
draft: false
replace_existing_draft: true
header: |
## {{ .ProjectName }} v{{ .Version }}
This release contains the Prometheus Exporter for Cisco WNC.
### 🐳 Container Images
```bash
# Latest version
docker run --rm ghcr.io/umatare5/cisco-wnc-exporter:latest --help
# Specific version
docker run --rm ghcr.io/umatare5/cisco-wnc-exporter:{{ .Tag }} --help
# With environment variables
docker run --rm -e WNC_ACCESS_TOKEN ghcr.io/umatare5/cisco-wnc-exporter:{{ .Tag }} command
```
### 📦 Binary Installation
```bash
go install github.com/umatare5/cisco-wnc-exporter@v{{ .Version }}
```
footer: |
**Full Changelog**: https://github.com/umatare5/cisco-wnc-exporter/compare/{{ .PreviousTag }}...{{ .Tag }}
### 📚 Documentation
- [README](https://github.com/umatare5/cisco-wnc-exporter/blob/{{ .Tag }}/README.md)
- [Container Registry](https://github.com/umatare5/cisco-wnc-exporter/pkgs/container/cisco-wnc-exporter)
# Generate checksums for source archives
checksum:
name_template: "{{ .ProjectName }}-v{{ .Version }}_checksums.txt"
# Changelog configuration
changelog:
use: github
sort: asc
abbrev: 0
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: Bug Fixes
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Documentation Updates
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 2
- title: Others
order: 999
filters:
exclude:
- "^Merge branch "
- "^release:"
- "^ci:"
- "^test:"
# Metadata for Go proxy and pkg.go.dev
metadata:
mod_timestamp: "{{ .CommitTimestamp }}"