diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index b00892c..c023656 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -61,29 +61,29 @@ jobs: python-version: '3.x' - name: Build sdist - run: | - python -m pip install cython numpy setuptools_scm - python setup.py sdist - + run: pipx run build --sdist - uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + name: cibw-sdist path: dist/*.tar.gz upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest + environment: pypi # upload to PyPI on every tag starting with 'v' # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') # alternatively, to publish when a GitHub Release is created, use the following rule: if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/download-artifact@v4 - with: - name: artifact + with: + # unpacks all CIBW artifacts into dist/ + pattern: cibw-* path: dist + merge-multiple: true - - uses: pypa/gh-action-pypi-publish@master + - uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.pypitoken }}