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.10 uses: actions/setup-python@v5 with: python-version: '3.10' - name: Install dependencies run: | python3 -m pip install --upgrade pip python3 -m pip install torch --index-url https://download.pytorch.org/whl/cpu - name: Install package run: | python3 -m pip install -e . python3 -m pip install setuptools wheel - name: Build a binary wheel and a source tarball run: | python setup.py sdist bdist_wheel # - name: Publish package to TestPyPI # uses: pypa/gh-action-pypi-publish@master # with: # user: __token__ # password: ${{ secrets.TEST_PYPI_PASSWORD }} # repository_url: https://test.pypi.org/legacy/ - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_PASSWORD }}