File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed
Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -195,25 +195,15 @@ jobs:
195195 if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
196196 env :
197197 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
198- VERSION : ${{ needs.build.outputs.version }}
199198 PRERELEASE : ${{ needs.build.outputs.prerelease }}
200199 run : |
201200 TAG_NAME="${GITHUB_REF#refs/tags/}"
202201
203- IS_DRAFT=$(gh release view "${TAG_NAME}" --json isDraft --jq '.isDraft' 2>/dev/null || echo "")
204- if [ -n "${IS_DRAFT}" ]; then
205- if [ "${IS_DRAFT}" = "false" ]; then
206- exit 0
207- fi
208- gh release edit "${TAG_NAME}" \
209- --title "pytest-asyncio ${VERSION}" \
210- --notes-file release-notes.md \
211- --draft
212-
213- gh release upload "${TAG_NAME}" dist/* --clobber
214- else
202+ gh release view "${TAG_NAME}" >/dev/null
203+ RELEASE_EXISTS=$?
204+ if [ $RELEASE_EXISTS -ne 0 ]; then
215205 gh release create "${TAG_NAME}" \
216- --title "pytest-asyncio ${VERSION }" \
206+ --title "pytest-asyncio ${TAG_NAME }" \
217207 --notes-file release-notes.md \
218208 --draft \
219209 $( [ "${PRERELEASE}" = "true" ] && echo "--prerelease" ) \
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments