diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2023-04-11 13:40:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 13:40:53 +0200 |
commit | 185507e9304b9ae6a165b93e2b508ef5f7975eea (patch) | |
tree | d26b5d9d28bc0444994af6922282fb7a18414d67 | |
parent | 51b3566170be25582b5c3216a54b024caf3d431f (diff) | |
download | setuptools-scm-185507e9304b9ae6a165b93e2b508ef5f7975eea.tar.gz |
configure for oidc auth with pypi
-rw-r--r-- | .github/workflows/python-tests.yml | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index a6fc97f..94d06a4 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -105,10 +105,11 @@ jobs: - run: pytest --test-legacy testing/test_setuptools_support.py || true # ignore fail flaky on ci - dist_upload: - + pypi-upload: runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + permissions: + id-token: write needs: [test] steps: - uses: actions/download-artifact@v3 @@ -117,5 +118,19 @@ jobs: path: dist - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + + test-pypi-upload: + runs-on: ubuntu-latest + needs: [test] + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v3 with: - password: ${{ secrets.pypi_token }} + name: Packages + path: dist + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + |