Skip to content

Commit

Permalink
Update release id check
Browse files Browse the repository at this point in the history
  • Loading branch information
cuicaihao committed Mar 23, 2024
1 parent 0b9ac2b commit 5f319c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/python-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f319c5

Please sign in to comment.