diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index ae2a7de26..4ce30554f 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -18,15 +18,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Create release + id: create-release run: | VERSION=$(./scripts/version-core) if pip index versions pyglossary --pre | grep "$VERSION," ; then echo 'Package version $VERSION already exists on pypi' + echo "skipnext=true" >> $GITHUB_OUTPUT exit 0 fi sudo rm -rf dist/* build/* || true python3 setup.py sdist bdist_wheel - name: Publish package distributions to PyPI + if: ( steps.create-release.outputs.skipnext != 'true' ) uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true