Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoReleaser: publish Homebrew formula to a Tap on each new release #460

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions cmd/goreleaser/internal/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ func Generate(dist string) config.Project {
Signs: Sign(),
DockerSigns: DockerSigns(),
SBOMs: SBOM(),
Brews: []config.Homebrew{
{
Name: dist,
Description: Description(dist),
Homepage: "https://opentelemetry.io/docs/collector/",
License: "Apache-2.0",
IDs: []string{
dist,
},
Repository: config.RepoRef{
Owner: "open-telemetry",
Name: "homebrew-tap",
},
},
},
}
}

Expand Down Expand Up @@ -297,3 +312,14 @@ func SBOM() []config.SBOM {
},
}
}

func Description(dist string) string {
switch dist {
case "otelcol":
return "OpenTelemetry collector distribution containing only core components"
case "otelcol-contrib":
return "OpenTelemetry collector distribution containing both core and contrib components"
default:
return ""
}
}
10 changes: 10 additions & 0 deletions distributions/otelcol-contrib/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ partial:
project_name: opentelemetry-collector-releases
env:
- COSIGN_YES=true
brews:
- name: otelcol-contrib
repository:
owner: open-telemetry
name: homebrew-tap
description: OpenTelemetry collector distribution containing both core and contrib components
homepage: https://opentelemetry.io/docs/collector/
license: Apache-2.0
ids:
- otelcol-contrib
builds:
- id: otelcol-contrib
goos:
Expand Down
10 changes: 10 additions & 0 deletions distributions/otelcol/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ partial:
project_name: opentelemetry-collector-releases
env:
- COSIGN_YES=true
brews:
- name: otelcol
repository:
owner: open-telemetry
name: homebrew-tap
description: OpenTelemetry collector distribution containing only core components
homepage: https://opentelemetry.io/docs/collector/
license: Apache-2.0
ids:
- otelcol
builds:
- id: otelcol
goos:
Expand Down