diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d2b35b4..60294cf 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,6 +14,7 @@ jobs: - "3.7" - "3.8" - "3.9" + - "3.10" steps: - uses: actions/checkout@v3 @@ -41,11 +42,8 @@ jobs: - run: python test/test_match.py - uses: actions/upload-artifact@v3 - with: - name: dist - path: dist - if: startsWith(github.ref, 'refs/tags/v') && - matrix.os == 'ubuntu-20.04' && + with: {name: dist, path: dist/} + if: matrix.os == 'ubuntu-20.04' && matrix.python == '3.9' deploy: @@ -53,19 +51,14 @@ jobs: runs-on: ubuntu-latest needs: build if: startsWith(github.ref, 'refs/tags/v') && success() + environment: + name: pypi + permissions: + id-token: write steps: - uses: actions/download-artifact@v3 - with: - name: dist - path: dist - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - run: pip install twine - - - name: Publish PyPI package - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: twine upload dist/*.whl dist/*.tar.gz + with: {name: dist, path: dist/} + - uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # repository-url: https://test.pypi.org/legacy/