From 5f319c53a2bdf29729e890a58e29e4213093a865 Mon Sep 17 00:00:00 2001 From: "Caihao (Chris) Cui" Date: Sat, 23 Mar 2024 18:37:57 +1100 Subject: [PATCH] Update release id check --- .github/workflows/python-CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-CD.yml b/.github/workflows/python-CD.yml index f17bebe..b64d6c3 100644 --- a/.github/workflows/python-CD.yml +++ b/.github/workflows/python-CD.yml @@ -112,7 +112,7 @@ jobs: - name: Check if release exists id: check_release run: | - RELEASE_ID=$(curl --silent --show-error --location --fail --retry 3 --output /dev/null --write-out "%{http_code}" --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.get_version.outputs.version }}") + RELEASE_ID=$(curl --silent --show-error --location --fail --retry 3 --output /dev/null --write-out "%{http_code}" --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.version }}") echo "exists=$([[ "$RELEASE_ID" != "404" ]] && echo true || echo false)" >> $GITHUB_ENV - name: Create Release id: create_release