diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index ecf83bf..7df413a 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -1,5 +1,3 @@ -name: Upload Python Package - on: # Trigger on release creation release: @@ -19,7 +17,7 @@ jobs: # Step 2: Set up Python - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v1 with: python-version: '3.x' @@ -27,15 +25,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build twine - - # Step 4: Build the package - - name: Build the package - run: python -m build + pip install setuptools wheel twine - # Step 5: Publish to PyPI - - name: Publish to PyPI + # Step 4: Build and publish to PyPI + - name: Build and publish env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # Set in repository secrets - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} # Set in repository secrets - run: twine upload dist/* + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/*