Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,22 @@ jobs:
path: dist
- name: Create GitHub Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
with:
name: pytest-asyncio ${{ needs.build.outputs.version }}
artifacts: dist/*
bodyFile: release-notes.md
prerelease: ${{ needs.build.outputs.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
draft: true
skipIfReleaseExists: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRERELEASE: ${{ needs.build.outputs.prerelease }}
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"

gh release view "${TAG_NAME}" >/dev/null
RELEASE_EXISTS=$?
if [ $RELEASE_EXISTS -ne 0 ]; then
gh release create "${TAG_NAME}" \
--title "pytest-asyncio ${TAG_NAME}" \
--notes-file release-notes.md \
--draft \
$( [ "${PRERELEASE}" = "true" ] && echo "--prerelease" ) \
dist/*
fi

publish-test-pypi:
name: Publish packages to test.pypi.org
Expand Down
Loading