diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2abcab0..434f29e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,9 +9,14 @@ jobs: build-and-publish: name: Build and publish to PyPI runs-on: ubuntu-latest + environment: release + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write steps: - - uses: actions/checkout@master + - name: Checkout source code + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 @@ -28,10 +33,8 @@ jobs: hatch build - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@v1.4.2 + uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} packages_dir: dist verbose: true