-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
131 lines (121 loc) · 3.61 KB
/
Copy path.goreleaser.yaml
File metadata and controls
131 lines (121 loc) · 3.61 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
# GoReleaser config for the Diamond CLI.
# Runs on tag push (vX.Y.Z) after semantic-release creates the tag.
# Docs: https://goreleaser.com
version: 2
project_name: diamond
before:
hooks:
- sh -c "cd cli && go mod download"
builds:
- id: diamond
dir: ./cli
main: .
binary: diamond
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w
- -X github.com/xavidop/diamond/cli/internal/version.Version={{ .Version }}
- -X github.com/xavidop/diamond/cli/internal/version.Commit={{ .Commit }}
- -X github.com/xavidop/diamond/cli/internal/version.Date={{ .Date }}
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
archives:
- id: diamond
formats:
- tar.gz
name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
format_overrides:
- goos: windows
formats:
- zip
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
use: github
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- "^ci:"
- "Merge "
groups:
- title: Features
regexp: '^.*?feat(\(.+\))??!?:.+$'
order: 0
- title: Bug fixes
regexp: '^.*?fix(\(.+\))??!?:.+$'
order: 1
- title: Others
order: 999
# Classic docker pipe: GoReleaser stages the built `diamond` binary into the
# build context so `COPY diamond` in cli/Dockerfile.goreleaser resolves. One
# image per arch, combined into a multi-arch manifest below.
dockers:
- id: diamond-amd64
goos: linux
goarch: amd64
dockerfile: cli/Dockerfile.goreleaser
use: buildx
image_templates:
- "ghcr.io/xavidop/diamond:{{ .Version }}-amd64"
- "ghcr.io/xavidop/diamond:latest-amd64"
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.source=https://github.com/xavidop/diamond"
- id: diamond-arm64
goos: linux
goarch: arm64
dockerfile: cli/Dockerfile.goreleaser
use: buildx
image_templates:
- "ghcr.io/xavidop/diamond:{{ .Version }}-arm64"
- "ghcr.io/xavidop/diamond:latest-arm64"
build_flag_templates:
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.source=https://github.com/xavidop/diamond"
docker_manifests:
- name_template: "ghcr.io/xavidop/diamond:{{ .Version }}"
image_templates:
- "ghcr.io/xavidop/diamond:{{ .Version }}-amd64"
- "ghcr.io/xavidop/diamond:{{ .Version }}-arm64"
- name_template: "ghcr.io/xavidop/diamond:latest"
image_templates:
- "ghcr.io/xavidop/diamond:latest-amd64"
- "ghcr.io/xavidop/diamond:latest-arm64"
homebrew_casks:
- name: diamond
repository:
owner: xavidop
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Casks
homepage: "https://github.com/xavidop/diamond"
description: "⚾ MLB stats in your terminal"
# Remove the macOS quarantine attribute so the unsigned binary runs.
hooks:
post:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/diamond"]
end
release:
github:
owner: xavidop
name: diamond