diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index f6bb8e0..31123a1 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,6 +1,6 @@ name: build wheels -on: [push, pull_request] +on: [push, pull_request] # TODO: on release with tags jobs: build_wheels: @@ -22,4 +22,36 @@ jobs: - uses: actions/upload-artifact@v3 with: - path: ./wheelhouse/*.whl \ No newline at end of file + path: ./wheelhouse/*.whl + + make_sdist: + name: Make SDist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Optional, use if you use setuptools_scm + submodules: true # Optional, use if you have submodules + + - name: Build SDist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v3 + with: + path: dist/*.tar.gz + + upload_all: + needs: [build_wheels, make_sdist] + environment: pypi + permissions: + id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + +# - uses: pypa/gh-action-pypi-publish@release/v1 +# with: +# password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file