diff --git a/.goreleaser-template.yaml b/.goreleaser-template.yaml deleted file mode 100644 index ee353099726..00000000000 --- a/.goreleaser-template.yaml +++ /dev/null @@ -1,102 +0,0 @@ -env: - - GOPRIVATE=github.com/smartcontractkit/* - - ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }} - - IMAGE_REPO={{ if index .Env "IMAGE_REPO" }}{{ .Env.IMAGE_REPO }}{{ else }}localhost:5001/{{ .ProjectName }}{{ end }} - -# See https://goreleaser.com/customization/build/ -builds: - - binary: "{{ .ProjectName }}" - id: linux-amd64 - env: - - CGO_ENABLED=1 - - CC=$ZIG_EXEC cc -target x86_64-linux-gnu - - CCX=$ZIG_EXEC c++ -target x86_64-linux-gnu - flags: - - -trimpath - - -buildmode=pie - goos: - - linux - goarch: - - amd64 - - binary: "{{ .ProjectName }}" - id: linux-arm64 - env: - - CGO_ENABLED=1 - - CC=$ZIG_EXEC cc -target aarch64-linux-gnu - - CCX=$ZIG_EXEC c++ -target aarch64-linux-gnu - flags: - - -trimpath - - -buildmode=pie - goos: - - linux - goarch: - - arm64 - -# See https://goreleaser.com/customization/docker/ -dockers: - - id: linux-amd64 - dockerfile: ./chainlink.goreleaser.Dockerfile - use: buildx - goos: linux - goarch: amd64 - build_flag_templates: - - "--build-arg=app={{ .ProjectName }}" - - "--platform=linux/amd64" - - "--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 }}" - image_templates: - - "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-amd64{{ end }}" - - "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-amd64{{ end }}" - - - id: linux-arm64 - dockerfile: ./chainlink.goreleaser.Dockerfile - use: buildx - goos: linux - goarch: arm64 - build_flag_templates: - - "--build-arg=app={{ .ProjectName }}" - - "--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 }}" - image_templates: - - "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-arm64{{ end }}" - - "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-arm64{{ end }}" - -# See https://goreleaser.com/customization/docker_manifest/ -docker_manifests: - - name_template: "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}{{ end }}" - image_templates: - - "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-amd64{{ end }}" - - "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-arm64{{ end }}" - - name_template: "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}{{ end }}" - image_templates: - - "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-amd64{{ end }}" - - "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-arm64{{ end }}" - -checksum: - name_template: "checksums.txt" -snapshot: - name_template: "{{ incpatch .Version }}-next" -changelog: - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" - -# GitHub Release -release: - github: - owner: smartcontractkit - name: chainlink - # If there is a prerelease suffix on the version tag (e.g. v1.0.0-rc1), then - # the GitHub Release will be created as a "prerelease". - # Default is false. - prerelease: auto - disable: true diff --git a/.goreleaser.develop.yaml b/.goreleaser.develop.yaml index 20312491651..f8cfc472ec2 100644 --- a/.goreleaser.develop.yaml +++ b/.goreleaser.develop.yaml @@ -1,57 +1,41 @@ -## goreleaser <1.14.0 +# For building binaries locally project_name: chainlink env: - - ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }} - IMAGE_PREFIX={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}localhost:5001{{ end }} - IMAGE_LABEL_DESCRIPTION="node of the decentralized oracle network, bridging on and off-chain computation" - IMAGE_LABEL_LICENSES="MIT" - IMAGE_LABEL_SOURCE="https://github.com/smartcontractkit/{{ .ProjectName }}" -before: - hooks: - - ./tools/bin/goreleaser_utils before_hook - # See https://goreleaser.com/customization/build/ builds: - - binary: chainlink - id: linux-arm64 + - id: linux-arm64 + binary: "{{ .ProjectName }}" goos: - linux goarch: - arm64 - hooks: - post: ./tools/bin/goreleaser_utils build_post_hook {{ dir .Path }} {{ .Os }} {{ .Arch }} env: - CGO_ENABLED=1 - - CC=$ZIG_EXEC cc -target aarch64-linux-gnu - - CCX=$ZIG_EXEC c++ -target aarch64-linux-gnu + - CC=zig cc -target aarch64-linux-gnu + - CCX=zig c++ -target aarch64-linux-gnu flags: - -trimpath - -buildmode=pie - ldflags: - - -s -w -r=$ORIGIN/libs - - -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .Env.CHAINLINK_VERSION }} - - -X github.com/smartcontractkit/chainlink/v2/core/static.Sha={{ .FullCommit }} - - binary: chainlink - id: linux-amd64 + + - id: linux-amd64 + binary: "{{ .ProjectName }}" goos: - linux goarch: - amd64 - hooks: - post: ./tools/bin/goreleaser_utils build_post_hook {{ dir .Path }} {{ .Os }} {{ .Arch }} env: - CGO_ENABLED=1 - - CC=$ZIG_EXEC cc -target x86_64-linux-gnu - - CCX=$ZIG_EXEC c++ -target x86_64-linux-gnu + - CC=zig cc -target x86_64-linux-gnu + - CCX=zig c++ -target x86_64-linux-gnu flags: - -trimpath - -buildmode=pie - ldflags: - - -s -w -r=$ORIGIN/libs - - -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .Env.CHAINLINK_VERSION }} - - -X github.com/smartcontractkit/chainlink/v2/core/static.Sha={{ .FullCommit }} # See https://goreleaser.com/customization/docker/ dockers: @@ -122,6 +106,7 @@ dockers: image_templates: - "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:develop-amd64" - "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:sha-{{ .ShortCommit }}-amd64" + - id: linux-arm64 dockerfile: core/chainlink.goreleaser.Dockerfile use: buildx @@ -170,13 +155,6 @@ docker_signs: - artifacts: all stdin: "{{ .Env.COSIGN_PASSWORD }}" -archives: - - rlcp: true - files: - - src: tmp/{{ .Os }}_{{ .Arch }}/libs/* - dst: libs - strip_parent: true - checksum: name_template: "checksums.txt" diff --git a/core/.goreleaser.yaml b/core/.goreleaser.yaml deleted file mode 100644 index 3e5b9561bc1..00000000000 --- a/core/.goreleaser.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Requires GoReleaser Pro -includes: - - from_file: - path: ./.goreleaser-template.yaml - -project_name: chainlink