diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 5d88665..f6c0270 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -3,9 +3,7 @@ name: Publish package to PYPI -on: - release: - types: [created] +on: push jobs: deploy: @@ -14,23 +12,20 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.x' - - - name: Upgrade PIP + - name: Install dependencies run: | python -m pip install --upgrade pip - - - name: Install Python testing dependencies + pip install setuptools wheel twine + - name: Build run: | - make install_requirements_test - - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - make publish + python setup.py sdist bdist_wheel + - name: Publish package + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}