name: Deploy to Pypi on: release: types: - published workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python 3.9 uses: actions/setup-python@v5 with: python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install torch --index-url https://download.pytorch.org/whl/cpu python -m pip install setuptools wheel - name: Install package run: | python -m pip install -e . - name: Build a binary wheel and a source tarball run: | python setup.py sdist bdist_wheel - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_PASSWORD }}