diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 91f1c8a3b..67c2f32e7 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -57,11 +57,8 @@ steps: - label: ":github: Release" key: "release" - # build.tag != null && build.branch == "main" if: | build.tag =~ /^v[0-9]+[.][0-9]+[.][0-9]+$$/ command: ".buildkite/scripts/release.sh" agents: - image: "golang:1.19.5" - cpu: "4" - memory: "16G" + provider: "gcp" diff --git a/.buildkite/scripts/install_deps.sh b/.buildkite/scripts/install_deps.sh index e8de610df..33c408a4c 100755 --- a/.buildkite/scripts/install_deps.sh +++ b/.buildkite/scripts/install_deps.sh @@ -5,6 +5,7 @@ set -euo pipefail source .buildkite/scripts/tooling.sh add_bin_path(){ + mkdir -p ${WORKSPACE}/bin export PATH="${WORKSPACE}/bin:${PATH}" } diff --git a/.buildkite/scripts/release.sh b/.buildkite/scripts/release.sh index afb3d18f4..e015bac30 100755 --- a/.buildkite/scripts/release.sh +++ b/.buildkite/scripts/release.sh @@ -2,6 +2,20 @@ set -euo pipefail +cleanup() { + rm -rf ${WORKSPACE} +} +trap cleanup exit + +WORKSPACE="/tmp/bin-buildkite/" + +VERSION="" +source .buildkite/scripts/install_deps.sh +source .buildkite/scripts/tooling.sh + +add_bin_path +with_go + echo "--- fetching tags" # Ensure that tags are present so goreleaser can build the changelog from the last release. git rev-parse --is-shallow-repository @@ -10,4 +24,3 @@ git fetch origin --tags echo "--- running goreleaser" # Run latest version of goreleaser curl -sL https://git.io/goreleaser | bash -