pypi.yml 1.1 KB

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