pypi.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: PyPI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - 'VERSION'
  8. jobs:
  9. Test:
  10. runs-on: ubuntu-20.04
  11. strategy:
  12. matrix:
  13. version: ['3.9']
  14. steps:
  15. - uses: actions/checkout@v2
  16. - uses: actions/setup-python@v5
  17. with:
  18. python-version: ${{ matrix.version }}
  19. - name: Test local builder
  20. run: |
  21. python -m python_appimage build local -p $(which python) \
  22. -d test.AppImage
  23. test -e test.AppImage
  24. Publish:
  25. needs: Test
  26. runs-on: ubuntu-latest
  27. if: github.ref == 'refs/heads/master'
  28. steps:
  29. - uses: actions/checkout@v2
  30. - uses: actions/setup-python@v1
  31. with:
  32. python-version: '3.9'
  33. - name: Build wheel
  34. run: |
  35. pip install -U pip
  36. pip install -U wheel
  37. python setup.py bdist_wheel --universal
  38. - name: Upload to PyPI
  39. if: github.ref == 'refs/heads/master'
  40. uses: pypa/gh-action-pypi-publish@master
  41. with:
  42. password: ${{ secrets.PYPI_TOKEN }}