diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 2bfc0f9..b8a63d3 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,24 +9,19 @@ on: jobs: deploy: - runs-on: ubuntu-latest - + permissions: + id-token: write steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.x' - - name: Install dependencies + - name: Install dependencies and build run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - pip install -r requirements.txt - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | + pip install setuptools wheel python setup.py sdist bdist_wheel - twine upload dist/* + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1