Skip to content

Commit

Permalink
Only run deployment if project file is updated, otherwise just run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nakedmcse committed Mar 24, 2024
1 parent 329e49c commit 90fab13
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
- name: prep action
uses: actions/checkout@v4

- name: filter changes
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
project:
- 'pyproject.toml'
- name: setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -28,11 +36,13 @@ jobs:
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 }}

0 comments on commit 90fab13

Please sign in to comment.