diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9c29203..6880e00 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,12 @@ jobs: build: runs-on: 'ubuntu-latest' + environment: release + permissions: + contents: write + id-token: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} strategy: matrix: platform: @@ -72,18 +78,14 @@ jobs: with: python-version: '3.8' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install twine - # PyPI package - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python -m twine upload wheelhouse/* + - name: Build Python package + run: python -m build + + - name: Publish Python package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: wheelhouse/ # Documentation - name: Setup Ubuntu