| 1 | name: Deploy to PyPI |
| 2 | |
| 3 | on: |
| 4 | create |
| 5 | |
| 6 | jobs: |
| 7 | deploy: |
| 8 | if: startsWith(github.ref, 'refs/tags/') |
| 9 | |
| 10 | runs-on: ubuntu-latest |
| 11 | steps: |
| 12 | - uses: actions/checkout@v2 |
| 13 | - name: Set up Python |
| 14 | uses: actions/setup-python@v1 |
| 15 | with: |
| 16 | python-version: '3.x' |
| 17 | |
| 18 | - name: Install dependencies |
| 19 | run: | |
| 20 | source ci/ci_ubuntu.sh |
| 21 | deployment_dependencies |
| 22 | |
| 23 | - name: Build Package |
| 24 | run: | |
| 25 | source ci/ci_ubuntu.sh |
| 26 | build |
| 27 | |
| 28 | - name: Create artifacts |
| 29 | uses: actions/upload-artifact@v1 |
| 30 | with: |
| 31 | name: plyer_artifact |
| 32 | path: dist |
| 33 | |
| 34 | - name: Upload to GitHub Releases |
| 35 | uses: softprops/[email protected] |
| 36 | with: |
| 37 | files: dist/* |
| 38 | draft: true |
| 39 | |
| 40 | - name: Publish to PyPI |
| 41 | env: |
| 42 | TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
| 43 | TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
| 44 | |
| 45 | run: | |
| 46 | source ci/ci_ubuntu.sh |
| 47 | deploy |