diff --git a/.github/workflows/base-ci-goreleaser.yaml b/.github/workflows/base-ci-goreleaser.yaml index 3617cc3e..81f1368e 100644 --- a/.github/workflows/base-ci-goreleaser.yaml +++ b/.github/workflows/base-ci-goreleaser.yaml @@ -22,6 +22,9 @@ jobs: matrix: GOOS: ${{ fromJSON( inputs.goos) }} GOARCH: ${{ fromJSON( inputs.goarch) }} + exclude: + - GOOS: windows + GOARCH: arm64 runs-on: ubuntu-24.04 steps: @@ -57,7 +60,7 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: ${{ env.GORELEASER_PRO_VERSION }} + version: v2.3.2 workdir: distributions/${{ inputs.distribution }} args: --snapshot --clean --skip=sign,sbom --timeout 2h --split env: diff --git a/.github/workflows/base-release.yaml b/.github/workflows/base-release.yaml index be6060cc..d7f97695 100644 --- a/.github/workflows/base-release.yaml +++ b/.github/workflows/base-release.yaml @@ -22,6 +22,9 @@ jobs: matrix: GOOS: ${{ fromJSON( inputs.goos) }} GOARCH: ${{ fromJSON( inputs.goarch) }} + exclude: + - GOOS: windows + GOARCH: arm64 runs-on: ubuntu-24.04 steps: @@ -74,7 +77,7 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: ${{ env.GORELEASER_PRO_VERSION }} + version: v2.3.2 workdir: distributions/${{ inputs.distribution }} args: release --clean --split --timeout 2h env: @@ -146,11 +149,10 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser for ${{ inputs.distribution }} - id: goreleaser-action uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: ${{ env.GORELEASER_PRO_VERSION }} + version: v2.3.2 workdir: distributions/${{ inputs.distribution }} args: continue --merge --timeout 2h env: diff --git a/.github/workflows/ci-goreleaser-axoflow-otel-collector.yaml b/.github/workflows/ci-goreleaser-axoflow-otel-collector.yaml index f96328a6..bb8616e9 100644 --- a/.github/workflows/ci-goreleaser-axoflow-otel-collector.yaml +++ b/.github/workflows/ci-goreleaser-axoflow-otel-collector.yaml @@ -29,7 +29,7 @@ jobs: with: distribution: axoflow-otel-collector goos: '[ "linux", "windows" ]' - goarch: '[ "amd64"]' + goarch: '[ "amd64", "arm64"]' secrets: inherit package-tests: diff --git a/.github/workflows/release-axoflow-otel-collector.yaml b/.github/workflows/release-axoflow-otel-collector.yaml index f8f71e22..282e6701 100644 --- a/.github/workflows/release-axoflow-otel-collector.yaml +++ b/.github/workflows/release-axoflow-otel-collector.yaml @@ -11,6 +11,6 @@ jobs: with: distribution: axoflow-otel-collector goos: '[ "linux", "windows" ]' - goarch: '[ "amd64" ]' + goarch: '[ "amd64", "arm64"]' secrets: inherit permissions: write-all diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index 12cd7a76..2c28bb78 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -35,7 +35,7 @@ const ( var ( ImagePrefixes = []string{"ghcr.io/axoflow/axoflow-otel-collector"} - Architectures = []string{"amd64"} + Architectures = []string{"amd64", "arm64"} Goos = []string{"linux", "windows"} DefaultConfigDists = map[string]bool{ImageName: true} MSIWindowsDists = map[string]bool{ImageName: true} @@ -90,6 +90,9 @@ func Build(dist string) config.Build { }, Goos: Goos, Goarch: Architectures, + Ignore: []config.IgnoredBuild{ + {Goos: "windows", Goarch: "arm64"}, + }, } } diff --git a/distributions/axoflow-otel-collector/.goreleaser.yaml b/distributions/axoflow-otel-collector/.goreleaser.yaml index 29f203e2..b83b6508 100644 --- a/distributions/axoflow-otel-collector/.goreleaser.yaml +++ b/distributions/axoflow-otel-collector/.goreleaser.yaml @@ -17,6 +17,10 @@ builds: - windows goarch: - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 dir: _build binary: axoflow-otel-collector ldflags: @@ -80,13 +84,33 @@ dockers: - --label=org.opencontainers.image.source={{.GitURL}} - --label=org.opencontainers.image.licenses=Apache-2.0 use: buildx + - goos: linux + goarch: arm64 + dockerfile: Dockerfile + image_templates: + - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-arm64 + - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-arm64 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/arm64 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + - --label=org.opencontainers.image.licenses=Apache-2.0 + use: buildx docker_manifests: - name_template: ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }} image_templates: - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-amd64 + - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-arm64 - name_template: ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest image_templates: - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-amd64 + - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-arm64 signs: - cmd: cosign args: