Ver código fonte

Use a trusted publisher when publishing to PyPI

Keith Suderman 16 horas atrás
pai
commit
1ef6f301ed
1 arquivos alterados com 1 adições e 3 exclusões
  1. 1 3
      .github/workflows/deploy.yaml

+ 1 - 3
.github/workflows/deploy.yaml

@@ -8,6 +8,7 @@ on:
 
 
 permissions:
 permissions:
   contents: read
   contents: read
+  id-token: write  # Required for trusted publishing to PyPI
 
 
 jobs:
 jobs:
   build-n-publish:
   build-n-publish:
@@ -33,11 +34,8 @@ jobs:
     - name: Publish distribution 📦 to Test PyPI
     - name: Publish distribution 📦 to Test PyPI
       uses: pypa/gh-action-pypi-publish@v1.14.0
       uses: pypa/gh-action-pypi-publish@v1.14.0
       with:
       with:
-        password: ${{ secrets.TEST_PYPI_API_TOKEN }}
         repository_url: https://test.pypi.org/legacy/
         repository_url: https://test.pypi.org/legacy/
         skip_existing: true
         skip_existing: true
     - name: Publish distribution 📦 to PyPI
     - name: Publish distribution 📦 to PyPI
       if: github.event_name == 'release'
       if: github.event_name == 'release'
       uses: pypa/gh-action-pypi-publish@v1.14.0
       uses: pypa/gh-action-pypi-publish@v1.14.0
-      with:
-        password: ${{ secrets.PYPI_API_TOKEN }}