diff --git a/.github/workflows/build-ci.yaml b/.github/workflows/build-ci.yaml index f1d29c0..836ad78 100644 --- a/.github/workflows/build-ci.yaml +++ b/.github/workflows/build-ci.yaml @@ -53,9 +53,22 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + name: artifact-cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl + make-sdist: + name: Make source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: artifact-source-dist + path: "./**/dist/*.tar.gz" + upload_pypi: if: github.event_name == 'push' && github.ref_type == 'tag' name: Publish built wheels to Pypi @@ -67,9 +80,13 @@ jobs: steps: - uses: actions/download-artifact@v4 - with: - name: artifact - path: dist + + - name: Copy artifacts to dist/ folder + run: | + find . -name 'artifact-*' -exec unzip '{}' \; + mkdir -p dist/ + find . -name '*.tar.gz' -exec mv '{}' dist/ \; + find . -name '*.whl' -exec mv '{}' dist/ \; - uses: pypa/gh-action-pypi-publish@release/v1 name: Publish to PyPI