Remove dist, cleanup files #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Deploy | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: prep action | |
uses: actions/checkout@v4 | |
- name: filter changes | |
uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
project: | |
- 'pyproject.toml' | |
- name: setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Run Tests | |
run: | | |
pip install --upgrade pip | |
pip install -e ".[dev]" | |
pytest tests/ | |
- name: Build a binary wheel | |
if: steps.changes.outputs.project == 'true' | |
run: | | |
pip install --upgrade build | |
python -m build | |
- name: Publish to PyPI | |
if: steps.changes.outputs.project == 'true' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |