From 2942229b4995a29ce0bf8cd8c25b0cae0c755d68 Mon Sep 17 00:00:00 2001 From: Chun Kit LAM Date: Tue, 31 Oct 2023 11:13:02 +0800 Subject: [PATCH] push to pypi (#583) * push to pypi * update action name --- .github/workflows/build_wheels.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index c0e8bad08..2c4742735 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -22,3 +22,35 @@ jobs: with: 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 + + pypi-publish: + name: Upload release to PyPI + needs: [build_wheels, make_sdist] + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/manifold3d + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1