From 8f253d5afa04b6f5675ff21654613cf2eb68611e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serta=C3=A7=20=C3=96zercan?= <852750+sozercan@users.noreply.github.com> Date: Fri, 31 Mar 2023 12:48:54 -0700 Subject: [PATCH] ci: fix gator cli build (#2657) --- .github/workflows/release.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 490fb3cf272..fd6e25667d7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,6 +21,11 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - name: Set up Go 1.20 + uses: actions/setup-go@v4 + with: + go-version: "1.20" + - name: Get tag id: get_version run: | @@ -83,7 +88,9 @@ jobs: make e2e-verify-release IMG=${{ env.IMAGE_REPO }}:${TAG} USE_LOCAL_IMG=false - name: Build gator-cli + shell: bash run: | + set -e build() { export GOOS="$(echo ${1} | cut -d '-' -f 1)" export GOARCH="$(echo ${1} | cut -d '-' -f 2)" @@ -97,11 +104,21 @@ jobs: tar -czf ${FILENAME}.tar.gz gator* popd } + mkdir -p _dist + + i=0 for os_arch_extension in $PLATFORMS; do - build ${os_arch_extension} & + build ${os_arch_extension} & + pids[${i}]=$! + ((i=i+1)) done - wait + + # wait for all pids + for pid in ${pids[*]}; do + wait $pid + done + pushd _dist # consolidate tar's sha256sum into a single file find . -type f -name '*.tar.gz' | sort | xargs sha256sum >> sha256sums.txt