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: release flow #33

Merged
merged 2 commits into from
Nov 21, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/base-ci-goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
distribution: axoflow-otel-collector
goos: '[ "linux", "windows" ]'
goarch: '[ "amd64"]'
goarch: '[ "amd64", "arm64"]'
secrets: inherit

package-tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-axoflow-otel-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
with:
distribution: axoflow-otel-collector
goos: '[ "linux", "windows" ]'
goarch: '[ "amd64" ]'
goarch: '[ "amd64", "arm64"]'
secrets: inherit
permissions: write-all
5 changes: 4 additions & 1 deletion cmd/goreleaser/internal/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -90,6 +90,9 @@ func Build(dist string) config.Build {
},
Goos: Goos,
Goarch: Architectures,
Ignore: []config.IgnoredBuild{
{Goos: "windows", Goarch: "arm64"},
},
}
}

Expand Down
24 changes: 24 additions & 0 deletions distributions/axoflow-otel-collector/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ builds:
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
dir: _build
binary: axoflow-otel-collector
ldflags:
Expand Down Expand Up @@ -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:
Expand Down