Skip to content

Commit bad3415

Browse files
dzhalaevdseifertm
andcommitted
refactor: apply suggestions from code review
* remove `changed` file * simplify main.yaml * replace VERSION to TAG_NAME in title Co-authored-by: Michael Seifert <m.seifert@digitalernachschub.de>
1 parent c2e0cdd commit bad3415

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff 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" ) \

changelog.d/1392.changed.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)