diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index f46e1ec..cdda27a 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -21,6 +21,9 @@ jobs: runs-on: ubuntu-latest env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: "true" + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write steps: - name: Recursive checkout uses: actions/checkout@v3 @@ -40,7 +43,4 @@ jobs: - name: Build package run: python -m build --sdist -n - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + uses: pypa/gh-action-pypi-publish@release/v1