| | |
| | | steps: |
| | | - name: Checkout code |
| | | uses: actions/checkout@v2 |
| | | with: |
| | | fetch-depth: 0 |
| | | |
| | | - name: Set up Python |
| | | uses: actions/setup-python@v1 |
| | |
| | | |
| | | - name: Install dependencies |
| | | run: | |
| | | pip install setuptools wheel twine |
| | | python -m venv venv |
| | | ./venv/bin/pip install build twine |
| | | |
| | | - name: Build package |
| | | run: python setup.py sdist bdist_wheel |
| | | run: | |
| | | ./venv/bin/python -m build |
| | | |
| | | - name: Publish package |
| | | env: |
| | | TWINE_USERNAME: '__token__' |
| | | TWINE_PASSWORD: '${{ secrets.PYPI_TOKEN }}' |
| | | run: twine upload dist/* |
| | | run: |
| | | ./venv/bin/python -m twine upload dist/* |