-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
166 lines (145 loc) · 4.27 KB
/
.goreleaser.yaml
File metadata and controls
166 lines (145 loc) · 4.27 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
version: 2
project_name: mycli
before:
hooks:
- go mod tidy
builds:
- id: mycli
main: ./main.go
binary: mycli
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s -w
- -X github.com/samzong/cli-template/cmd.Version={{.Version}}
- -X github.com/samzong/cli-template/cmd.BuildTime={{.Date}}
archives:
- id: default
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
files:
- README.md
- LICENSE
dockers:
- image_templates:
- "ghcr.io/samzong/{{ .ProjectName }}:{{ .Version }}-amd64"
- "ghcr.io/samzong/{{ .ProjectName }}:latest-amd64"
dockerfile: Dockerfile.goreleaser
use: buildx
goos: linux
goarch: amd64
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source=https://github.com/samzong/{{ .ProjectName }}"
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/samzong/{{ .ProjectName }}:{{ .Version }}-arm64"
- "ghcr.io/samzong/{{ .ProjectName }}:latest-arm64"
dockerfile: Dockerfile.goreleaser
use: buildx
goos: linux
goarch: arm64
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source=https://github.com/samzong/{{ .ProjectName }}"
- "--platform=linux/arm64"
docker_manifests:
- name_template: "ghcr.io/samzong/{{ .ProjectName }}:{{ .Version }}"
image_templates:
- "ghcr.io/samzong/{{ .ProjectName }}:{{ .Version }}-amd64"
- "ghcr.io/samzong/{{ .ProjectName }}:{{ .Version }}-arm64"
- name_template: "ghcr.io/samzong/{{ .ProjectName }}:latest"
image_templates:
- "ghcr.io/samzong/{{ .ProjectName }}:latest-amd64"
- "ghcr.io/samzong/{{ .ProjectName }}:latest-arm64"
brews:
- name: mycli
# TEMPLATE_PLACEHOLDER: Tap repository (will be replaced by customize.sh)
repository:
owner: samzong
name: homebrew-tap
branch: main
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
pull_request:
enabled: true
directory: Formula
homepage: "https://github.com/samzong/mycli"
description: "A CLI application built with Go"
license: "MIT"
changelog:
use: github
sort: asc
abbrev: 0
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: 'Performance improvements'
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
order: 2
- title: Others
order: 999
filters:
exclude:
- '^docs:'
- '^test:'
- '^ci:'
- '^chore:'
- '^style:'
- '^refactor:'
- '^Merge'
- '^\[skip'
checksum:
name_template: 'checksums.txt'
algorithm: sha256
snapshot:
name_template: "{{ incpatch .Version }}-next"
release:
# Create release notes from changelog
header: |
## Installation
### Homebrew (macOS/Linux)
```bash
brew install samzong/tap/{{ .ProjectName }}
```
### Direct Download
Download the appropriate binary for your platform from the assets below.
### Docker
```bash
docker run --rm ghcr.io/samzong/{{ .ProjectName }}:{{ .Version }}
```
footer: |
## Verification
All binaries are signed and checksums are available in `checksums.txt`.
**Full Changelog**: https://github.com/samzong/{{ .ProjectName }}/compare/{{ .PreviousTag }}...{{ .Tag }}
metadata:
mod_timestamp: "{{ .CommitTimestamp }}"