diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a778403..330d3d31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -209,6 +209,9 @@ jobs: needs: [compile-without-audio, compile-with-audio, test] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') runs-on: ubuntu-24.04 + permissions: + id-token: write # required for PyPI trusted publishing (OIDC) + contents: read steps: - name: Checkout repo uses: actions/checkout@v3 @@ -219,12 +222,7 @@ jobs: - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - - name: Install dependencies - run: poetry install - - name: Publish to pypi - run: | - poetry config repositories.remote https://upload.pypi.org/legacy/ - poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD" - env: - PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + - name: Build + run: poetry build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1