pypi.yml 1.0 KB

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