deploy #22
Workflow file for this run
This file contains hidden or 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: deploy | |
| on: | |
| push: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run style checks with ruff | |
| run: | | |
| pip install ruff | |
| ruff check src/billsplittermds tests/ | |
| - name: Run tests | |
| run: | | |
| pytest | |
| - name: Install build dependencies | |
| run: | | |
| pip install build twine | |
| - name: Build package | |
| run: python -m build | |
| - name: Publish to TestPyPI | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
| run: | | |
| twine upload --repository testpypi dist/* |