-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
182 lines (169 loc) · 5.84 KB
/
Copy path.goreleaser.yaml
File metadata and controls
182 lines (169 loc) · 5.84 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
project_name: dash0
version: 2
before:
hooks:
- go mod download
- sh scripts/completions.sh
builds:
- id: dash0
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- arm
- ppc64le
- s390x
dir: ./
main: ./cmd/dash0
ldflags:
- -s -w -X main.version={{.Version}} -X main.date={{.Date}}
checksum:
name_template: "checksums.txt"
archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}macos
{{- else }}{{ .Os }}{{ end }}_
{{- .Arch }}
files:
- completions/*
format_overrides:
- goos: windows
format: zip
release:
prerelease: auto
mode: replace
changelog:
disable: false
dockers:
- image_templates:
- "ghcr.io/dash0hq/cli:{{ .Tag }}-amd64"
- "ghcr.io/dash0hq/cli:latest-amd64"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--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}}"
- image_templates:
- "ghcr.io/dash0hq/cli:{{ .Tag }}-arm64"
- "ghcr.io/dash0hq/cli:latest-arm64"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform=linux/arm64"
- "--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}}"
goarch: arm64
docker_manifests:
- name_template: "ghcr.io/dash0hq/cli:{{ .Tag }}"
image_templates:
- "ghcr.io/dash0hq/cli:{{ .Tag }}-amd64"
- "ghcr.io/dash0hq/cli:{{ .Tag }}-arm64"
- name_template: "ghcr.io/dash0hq/cli:latest"
image_templates:
- "ghcr.io/dash0hq/cli:latest-amd64"
- "ghcr.io/dash0hq/cli:latest-arm64"
docker_signs:
- cmd: cosign
artifacts: all
output: true
args:
- "sign"
- "${artifact}"
- "--yes"
brews:
# Legacy formula tap inside the source repo.
# Kept publishing here until the cutover release so existing users on
# `dash0hq/dash0-cli` keep getting updates during the migration window.
# After cutover this entry gets `skip_upload: true` and `Formula/dash0.rb`
# is hand-edited to add a `deprecate!` directive pointing at the new cask.
# See docs/brew-tap-migration-2026-06.md.
- name: dash0
repository:
owner: dash0hq
name: dash0-cli
commit_author:
name: github-actions[bot]
email: github-actions[bot]@users.noreply.github.com
commit_msg_template: "chore: brew formula update for {{ .ProjectName }} version {{ .Tag }}"
directory: Formula
homepage: https://github.com/dash0hq/dash0-cli
description: CLI to interact with Dash0
extra_install: |
bash_completion.install "completions/dash0.bash" => "dash0"
zsh_completion.install "completions/dash0.zsh" => "_dash0"
fish_completion.install "completions/dash0.fish" => "dash0.fish"
homebrew_casks:
# New dedicated tap. Ships as a Homebrew cask (not a formula) because the
# CLI is a pre-built binary — that's what casks are for, and what goreleaser
# recommends since v2.10 (the `brews:` section is being phased out).
# Resolves to `brew install --cask dash0hq/dash0-cli/dash0` for users
# (Homebrew strips the `homebrew-` prefix from the repo name).
- name: dash0
repository:
owner: dash0hq
name: homebrew-dash0-cli
commit_author:
name: github-actions[bot]
email: github-actions[bot]@users.noreply.github.com
commit_msg_template: "release: dash0-cli/{{ .Version }}"
homepage: https://github.com/dash0hq/dash0-cli
description: CLI to interact with Dash0
binary: dash0
completions:
bash: completions/dash0.bash
zsh: completions/dash0.zsh
fish: completions/dash0.fish
hooks:
post:
# Strip the macOS Gatekeeper quarantine attribute, but only on macOS.
# `/usr/bin/xattr` and `com.apple.quarantine` are macOS-only; running
# the hook unconditionally breaks `brew install --cask` on Linux,
# where the binary has no such tool or attribute.
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", staged_path]
end
nix:
# Pre-built binary published to the Dash0 Nix User Repository (NUR) — the Nix
# counterpart to the Homebrew cask above. After publishing, GoReleaser writes
# pkgs/dash0/default.nix (a fetchurl-based derivation pinning the release
# tarball hashes) to the separate dash0hq/nur repo. Because the manifest is
# written post-build to its own repo, every released version is exactly
# reproducible — no in-source vendorHash-style upkeep and no per-tag lag.
#
# Users install with: nix profile install github:dash0hq/nur#dash0
#
# The dash0hq/nur repo is set up (flake.nix + a placeholder pkgs/dash0; see
# CONTRIBUTING.md "Nix packaging"). The push reuses the GoReleaser
# GITHUB_TOKEN (REPOSITORY_FULL_ACCESS_GITHUB_TOKEN), which must have write
# access to that repo.
- name: dash0
repository:
owner: dash0hq
name: nur
commit_author:
name: github-actions[bot]
email: github-actions[bot]@users.noreply.github.com
commit_msg_template: "release: dash0/{{ .Version }}"
homepage: https://github.com/dash0hq/dash0-cli
description: CLI to interact with Dash0
license: asl20
install: |
mkdir -p $out/bin
cp -vr ./dash0 $out/bin/dash0
installShellCompletion ./completions/*