diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 292f51d2..2dfd3558 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,8 @@ jobs: needs: [test, lint] runs-on: ubuntu-latest if: github.event_name == 'release' + permissions: + id-token: write steps: - uses: actions/checkout@v2 - name: Set up Python @@ -70,11 +72,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + pip install setuptools wheel build + - name: Build distributions + run: python -m build + - name: Publish to pypi + uses: pypa/gh-action-pypi-publish@release/v1