diff --git a/.github/workflows/release_awm_relayer.yml b/.github/workflows/release_awm_relayer.yml index ede684d9..240c0d56 100644 --- a/.github/workflows/release_awm_relayer.yml +++ b/.github/workflows/release_awm_relayer.yml @@ -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 }} diff --git a/.github/workflows/release_signature_aggregator.yml b/.github/workflows/release_signature_aggregator.yml index 4a71f529..61474a72 100644 --- a/.github/workflows/release_signature_aggregator.yml +++ b/.github/workflows/release_signature_aggregator.yml @@ -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 }} diff --git a/relayer/.goreleaser.yml b/relayer/.goreleaser.yml new file mode 100644 index 00000000..d86ab79f --- /dev/null +++ b/relayer/.goreleaser.yml @@ -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 diff --git a/.goreleaser.yml b/signature-aggregator/.goreleaser.yml similarity index 56% rename from .goreleaser.yml rename to signature-aggregator/.goreleaser.yml index 2badb412..85afc2c9 100644 --- a/.goreleaser.yml +++ b/signature-aggregator/.goreleaser.yml @@ -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 @@ -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 @@ -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'