diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index ef91785..25cee60 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -9,6 +9,9 @@ on: jobs: build: runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write steps: - uses: actions/checkout@master @@ -27,10 +30,4 @@ jobs: - name: Upload to PyPi if: startsWith(github.ref, 'refs/tags/') - run: | - twine upload dist/* --repository pypi -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} - - - name: Upload to TestPyPi - if: startsWith(github.ref, 'refs/tags/') == false - run: | - twine upload dist/* --repository testpypi -u __token__ -p ${{ secrets.TESTPYPI_API_TOKEN }} \ No newline at end of file + uses: pypa/gh-action-pypi-publish@release/v1