Skip to content

Upload Python Package #4

Upload Python Package

Upload Python Package #4

Workflow file for this run

name: Upload Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install pytest
pip install torch==1.12.1 --index-url https://download.pytorch.org/whl/cpu
pip install -e . --verbose
pip install -r requirements.txt
- name: Test
run: |
cd tests && pytest && cd ..
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.8.7
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}