Skip to content

Commit

Permalink
split into two .goreleaser.yml's
Browse files Browse the repository at this point in the history
  • Loading branch information
feuGeneA committed Sep 5, 2024
1 parent de5a0a4 commit d5ec489
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_awm_relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
with:
distribution: goreleaser-pro
version: latest
args: release --clean
args: release --clean --config relayer/.goreleaser.yml
env:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_signature_aggregator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
with:
distribution: goreleaser-pro
version: latest
args: release --clean --config signature-aggregator.goreleaser.yml
args: release --clean --config signature-aggregator/.goreleaser.yml
env:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
68 changes: 68 additions & 0 deletions relayer/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# ref. https://goreleaser.com/customization/build/
project_name: awm-relayer
monorepo:
tag_prefix: awm-relayer/
builds:
- id: awm-relayer
main: ./relayer/main/main.go
binary: awm-relayer
flags:
- -v
# windows is ignored by default, as the `goos` field by default only
# contains linux and darwin
goos:
- linux
- darwin
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=1
- CGO_CFLAGS=-O -D__BLST_PORTABLE__ # Set the CGO flags to use the portable version of BLST
overrides:
- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-gnu-gcc
- goos: darwin
goarch: arm64
env:
- CC=oa64-clang
ignore:
- goos: darwin
goarch: amd64
dockers:
- image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-amd64'
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
dockerfile: "relayer/Dockerfile"
- image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-arm64'
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
dockerfile: "relayer/Dockerfile"
goarch: arm64
docker_manifests:
- name_template: 'avaplatform/awm-relayer:{{ .Tag }}'
image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-amd64'
- 'avaplatform/awm-relayer:{{ .Tag }}-arm64'
- name_template: 'avaplatform/awm-relayer:latest'
image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-amd64'
- 'avaplatform/awm-relayer:{{ .Tag }}-arm64'
# If tag is an rc, do not push the latest tag
skip_push: auto
release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL or empty if its private hosted.
github:
owner: ava-labs
name: awm-relayer
# If tag indicates rc, will mark it as prerelease
prerelease: auto
56 changes: 2 additions & 54 deletions .goreleaser.yml → signature-aggregator/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,8 @@
# ref. https://goreleaser.com/customization/build/
project_name: signature-aggregator
monorepo:
tag_prefix: v
tag_prefix: signature-aggregator/
builds:
- id: awm-relayer
main: ./relayer/main/main.go
binary: awm-relayer
flags:
- -v
# windows is ignored by default, as the `goos` field by default only
# contains linux and darwin
goos:
- linux
- darwin
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=1
- CGO_CFLAGS=-O -D__BLST_PORTABLE__ # Set the CGO flags to use the portable version of BLST
overrides:
- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-gnu-gcc
- goos: darwin
goarch: arm64
env:
- CC=oa64-clang
ignore:
- goos: darwin
goarch: amd64
- id: signature-aggregator
main: ./signature-aggregator/main/main.go
binary: signature-aggregator
Expand Down Expand Up @@ -59,21 +32,6 @@ builds:
- goos: darwin
goarch: amd64
dockers:
- image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-amd64'
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
dockerfile: "relayer/Dockerfile"
- image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-arm64'
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
dockerfile: "relayer/Dockerfile"
goarch: arm64
- image_templates:
- 'avaplatform/signature-aggregator:{{ .Tag }}-amd64'
use: buildx
Expand All @@ -90,16 +48,6 @@ dockers:
dockerfile: "signature-aggregator/Dockerfile"
goarch: arm64
docker_manifests:
- name_template: 'avaplatform/awm-relayer:{{ .Tag }}'
image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-amd64'
- 'avaplatform/awm-relayer:{{ .Tag }}-arm64'
- name_template: 'avaplatform/awm-relayer:latest'
image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-amd64'
- 'avaplatform/awm-relayer:{{ .Tag }}-arm64'
# If tag is an rc, do not push the latest tag
skip_push: auto
- name_template: 'avaplatform/signature-aggregator:{{ .Tag }}'
image_templates:
- 'avaplatform/signature-aggregator:{{ .Tag }}-amd64'
Expand Down

0 comments on commit d5ec489

Please # to comment.