From b9bd38a89b22b9a3539531a11d27ff3939d13902 Mon Sep 17 00:00:00 2001 From: 8cH9azbsFifZ Date: Sun, 12 Nov 2023 22:34:41 +0100 Subject: [PATCH] only pypi --- .github/workflows/release_to_pypi.yml | 35 +++------------------------ 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release_to_pypi.yml b/.github/workflows/release_to_pypi.yml index 65b256a..3a07872 100644 --- a/.github/workflows/release_to_pypi.yml +++ b/.github/workflows/release_to_pypi.yml @@ -39,9 +39,10 @@ jobs: python -m pip install --upgrade build twine python -m build twine check --strict dist/* - + + # only upload if a tag has been added to pypi - name: Publish distribution to Test PyPI - if: startsWith(github.ref, 'refs/tags') + if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_API_TOKEN }} @@ -51,32 +52,4 @@ jobs: # uses: pypa/gh-action-pypi-publish@master # with: # user: __token__ - # password: ${{ secrets.PYPI_API_TOKEN }} - - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: false - prerelease: false - - - name: Get Asset name - run: | - export PKG=$(ls dist/ | grep tar) - set -- $PKG - echo "name=$1" >> $GITHUB_ENV - - - name: Upload Release Asset (sdist) to GitHub - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/${{ env.name }} - asset_name: ${{ env.name }} - asset_content_type: application/zip \ No newline at end of file + # password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file