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

fix(deps): update goreleaser pro #779

Merged
merged 6 commits into from
Feb 11, 2025
Merged
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
20 changes: 15 additions & 5 deletions .github/workflows/base-ci-goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.4.8
GORELEASER_PRO_VERSION: v2.7.0

jobs:
check-goreleaser:
Expand Down Expand Up @@ -126,8 +126,9 @@ jobs:
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: 7 # Default is 6
GOARM: "7" # Default is 6
GOAMD64: v1
GOPPC64: power8
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

- name: Move built artifacts
Expand All @@ -148,19 +149,28 @@ jobs:
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: 7 # Default is 6
GOARM: "7" # Default is 6
GOAMD64: v1
GOPPC64: power8
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

- name: Print built artifacts
run: cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json

- name: Print dist folder contents
if: always()
run: ls -laR ./distributions/${{ inputs.distribution }}/dist

- name: Upload linux service packages
if: ${{ matrix.GOOS == 'linux' && matrix.GOARCH == 'amd64' }}
if: ${{ matrix.GOOS == 'linux' && matrix.GOARCH == 'amd64' && (inputs.distribution == 'otelcol-contrib' || inputs.distribution == 'otelcol') }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: linux-packages
path: distributions/${{ inputs.distribution }}/dist/linux_amd64_v1/*
if-no-files-found: error

- name: Upload MSI packages
if: matrix.GOOS == 'windows' && matrix.GOARCH == 'amd64'
if: matrix.GOOS == 'windows' && matrix.GOARCH == 'amd64' && (inputs.distribution == 'otelcol-contrib' || inputs.distribution == 'otelcol')
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: msi-packages
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.4.8
GORELEASER_PRO_VERSION: v2.7.0

jobs:
prepare:
Expand Down Expand Up @@ -100,8 +100,9 @@ jobs:
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: 7 # Default is 6
GOARM: "7" # Default is 6
GOAMD64: v1
GOPPC64: power8
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
COSIGN_YES: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/builder-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.4.8
GORELEASER_PRO_VERSION: v2.7.0

jobs:
goreleaser:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/builder-testbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.4.8
GORELEASER_PRO_VERSION: v2.7.0

jobs:
check-goreleaser:
Expand Down
3 changes: 2 additions & 1 deletion cmd/builder/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ release:
header: |
### Images and binaries for collector distributions here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/{{ .Tag }}
archives:
- format: binary
- formats:
- binary
checksum:
name_template: "checksums.txt"
snapshot:
Expand Down
37 changes: 25 additions & 12 deletions cmd/goreleaser/internal/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ func GenerateContribBuildOnly(dist string, buildOrRest bool) config.Project {
TagPrefix: "v",
},
Partial: Partial,
Archives: []config.Archive{
{
Formats: []string{
"binary",
},
},
},
}
}

Expand Down Expand Up @@ -107,12 +114,13 @@ func Build(dist string, buildOrRest bool) config.Build {
Path: "artifacts/otelcol-contrib_{{ .Target }}" +
"/otelcol-contrib{{- if eq .Os \"windows\" }}.exe{{ end }}",
},
Goos: goos,
Goarch: archs,
Goarm: ArmVersions(dist),
Dir: "_build",
Binary: dist,
Ignore: IgnoreBuildCombinations(dist),
Goos: goos,
Goarch: archs,
Goarm: ArmVersions(dist),
Goppc64: Ppc64Versions(dist),
Dir: "_build",
Binary: dist,
Ignore: IgnoreBuildCombinations(dist),
}
}

Expand All @@ -130,10 +138,11 @@ func Build(dist string, buildOrRest bool) config.Build {
Flags: []string{"-trimpath"},
Ldflags: []string{"-s", "-w"},
},
Goos: goos,
Goarch: archs,
Goarm: ArmVersions(dist),
Ignore: IgnoreBuildCombinations(dist),
Goos: goos,
Goarch: archs,
Goarm: ArmVersions(dist),
Goppc64: Ppc64Versions(dist),
Ignore: IgnoreBuildCombinations(dist),
}
}

Expand All @@ -158,6 +167,10 @@ func ArmVersions(dist string) []string {
return []string{"7"}
}

func Ppc64Versions(dist string) []string {
return []string{"power8"}
}

func Archives(dist string) []config.Archive {
return []config.Archive{
Archive(dist),
Expand Down Expand Up @@ -210,7 +223,7 @@ func Packages(dist string) []config.NFPM {
// Package configures goreleaser to build a system package.
// https://goreleaser.com/customization/nfpm/
func Package(dist string) config.NFPM {
nfpmContents := config.NFPMContents{
nfpmContents := []config.NFPMContent{
{
Source: fmt.Sprintf("%s.service", dist),
Destination: path.Join("/lib", "systemd", "system", fmt.Sprintf("%s.service", dist)),
Expand All @@ -222,7 +235,7 @@ func Package(dist string) config.NFPM {
},
}
if _, ok := DefaultConfigDists[dist]; ok {
nfpmContents = append(nfpmContents, &config.NFPMContent{
nfpmContents = append(nfpmContents, config.NFPMContent{
Source: "config.yaml",
Destination: path.Join("/etc", dist, "config.yaml"),
Type: "config|noreplace",
Expand Down
5 changes: 5 additions & 0 deletions distributions/otelcol-contrib/.goreleaser-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ builds:
- s390x
goarm:
- "7"
goppc64:
- power8
ignore:
- goos: darwin
goarch: "386"
Expand All @@ -37,6 +39,9 @@ builds:
- -trimpath
env:
- CGO_ENABLED=0
archives:
- formats:
- binary
monorepo:
tag_prefix: v
partial:
Expand Down
2 changes: 2 additions & 0 deletions distributions/otelcol-contrib/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ builds:
- s390x
goarm:
- "7"
goppc64:
- power8
ignore:
- goos: darwin
goarch: "386"
Expand Down
2 changes: 2 additions & 0 deletions distributions/otelcol-k8s/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ builds:
- arm64
- ppc64le
- s390x
goppc64:
- power8
dir: _build
binary: otelcol-k8s
ldflags:
Expand Down
2 changes: 2 additions & 0 deletions distributions/otelcol-otlp/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ builds:
- s390x
goarm:
- "7"
goppc64:
- power8
ignore:
- goos: darwin
goarch: "386"
Expand Down
2 changes: 2 additions & 0 deletions distributions/otelcol/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ builds:
- s390x
goarm:
- "7"
goppc64:
- power8
ignore:
- goos: darwin
goarch: "386"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-releases
go 1.23

require (
github.com/goreleaser/goreleaser-pro/v2 v2.4.8-pro
github.com/goreleaser/goreleaser-pro/v2 v2.7.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/goreleaser/goreleaser-pro/v2 v2.4.8-pro h1:crnjm84+p9HnuVGkq12T4fkKJQddR5bdu6kA5KoiNq8=
github.com/goreleaser/goreleaser-pro/v2 v2.4.8-pro/go.mod h1:GA7Uzk7qKA3efeDmgfWwcMTrDJe+V7D6H5RMqXlFvuc=
github.com/goreleaser/goreleaser-pro/v2 v2.7.0 h1:07p7y2N3chwz1MIs5HwnkTE/OUo63asEQeuPyVP6eag=
github.com/goreleaser/goreleaser-pro/v2 v2.7.0/go.mod h1:GA7Uzk7qKA3efeDmgfWwcMTrDJe+V7D6H5RMqXlFvuc=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
Expand Down
Loading