master: updating setup #12
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 to PyPI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.11' | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install dependencies | |
| run: | | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| pip install setuptools wheel twine | |
| - name: Run tests | |
| run: python manage.py test | |
| - name: Build package | |
| run: python setup.py sdist bdist_wheel | |
| - name: Publish to PyPI | |
| if: success() | |
| uses: pypa/gh-action-pypi-publish@master | |
| with: | |
| user: ${{ secrets.PYPI_USERNAME }} | |
| password: ${{ secrets.PYPI_PASSWORD }} |