diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 5cdc1ead7d..eb26d5fe6f 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -51,25 +51,12 @@ jobs: name: dist path: ./photon-lib/py/dist/ - pypi-publish: - name: Upload release to PyPI - runs-on: ubuntu-latest - needs: - - build - environment: - name: pypi - url: https://pypi.org/p/photonlibpy + - name: Publish package distributions to TestPyPI + # Only upload on tags + # if: startsWith(github.ref, 'refs/tags/v') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages_dir: ./photon-lib/py/dist/ + permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing - steps: - - name: Download all the dists - uses: actions/download-artifact@v3 - with: - name: dist - path: dist/ - - name: Publish package distributions to TestPyPI - # Only upload on tags - if: startsWith(github.ref, 'refs/tags/v') - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/