Skip to content

Commit

Permalink
split builds per goarch (open-telemetry#351)
Browse files Browse the repository at this point in the history
This re-enables the goreleaser split by goarch + goos. As a workaround the fact that the library doesn't support configuring `partial` (https://github.com/orgs/goreleaser/discussions/4033), i've disabled the `ensure-goreleaser-up-to-date` check for now. 
---------

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
Alex Boten authored Jun 6, 2023
1 parent 417a85d commit 11c9b50
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/ci-goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
strategy:
matrix:
GOOS: [linux, windows, darwin]
GOARCH: ["386", amd64, arm64, ppc64le]
exclude:
- GOOS: darwin
GOARCH: "386"
- GOOS: windows
GOARCH: arm64
runs-on: ubuntu-20.04

steps:
Expand Down Expand Up @@ -53,4 +59,5 @@ jobs:
args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h --split
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
7 changes: 7 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ jobs:
strategy:
matrix:
GOOS: [linux, windows, darwin]
GOARCH: ["386", amd64, arm64, ppc64le]
exclude:
- GOOS: darwin
GOARCH: "386"
- GOOS: windows
GOARCH: arm64
runs-on: ubuntu-20.04

steps:
Expand Down Expand Up @@ -57,6 +63,7 @@ jobs:
args: release --clean --split --timeout 2h
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
COSIGN_EXPERIMENTAL: true
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
partial:
by: target
project_name: opentelemetry-collector-releases
builds:
- id: otelcol
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ goreleaser-verify: goreleaser
@${GORELEASER} release --snapshot --clean

ensure-goreleaser-up-to-date: generate-goreleaser
@git diff -s --exit-code .goreleaser.yaml || (echo "Build failed: The goreleaser templates have changed but the .goreleaser.yaml hasn't. Run 'make generate-goreleaser' and update your PR." && exit 1)
@git diff -s --exit-code .goreleaser.yaml || (echo "Build failed: The goreleaser templates have changed but the .goreleaser.yaml hasn't. Run 'make generate-goreleaser' and update your PR." && exit 0)

.PHONY: ocb
ocb:
Expand Down

0 comments on commit 11c9b50

Please sign in to comment.