pypi.yml 1019 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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.5']
  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 local -p $(which python) -d test.AppImage
  24. test -e test.AppImage
  25. Publish:
  26. needs: Test
  27. runs-on: ubuntu-latest
  28. steps:
  29. - uses: actions/checkout@v2
  30. - uses: actions/setup-python@v1
  31. with:
  32. python-version: '3.8'
  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 }}