1
0

appimage.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. name: AppImage
  2. on:
  3. push:
  4. paths:
  5. - '.github/workflows/appimage.yml'
  6. - 'python_appimage/**'
  7. jobs:
  8. Build:
  9. runs-on: ubuntu-latest
  10. strategy:
  11. matrix:
  12. image: ['1', '2010', '2014']
  13. arch: [x86_64, i686]
  14. tag: [cp27-cp27m, cp27-cp27mu, cp35-cp35m, cp36-cp36m, cp37-cp37m,
  15. cp38-cp38]
  16. exclude:
  17. - image: '2014'
  18. tag: cp27-cp27m
  19. - image: '2014'
  20. tag: cp27-cp27mu
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Build
  24. run: |
  25. # Build the AppImage
  26. python -m python_appimage build manylinux \
  27. ${{ matrix.image }}_${{ matrix.arch }} \
  28. ${{ matrix.tag }}
  29. # Export the AppImage name and the Python version
  30. appimage=$(ls python*.AppImage)
  31. SCRIPT=$(cat <<-END
  32. version = '${appimage}'[6:].split('.', 2)
  33. print('{:}.{:}'.format(*version[:2]))
  34. END
  35. )
  36. version=$(python -c "${SCRIPT}")
  37. echo "::set-env name=PYTHON_APPIMAGE::${appimage}"
  38. echo "::set-env name=PYTHON_VERSION::${version}"
  39. - uses: actions/upload-artifact@v1
  40. if: github.ref == 'refs/heads/master'
  41. with:
  42. name: python${{ env.PYTHON_VERSION }}-appimages
  43. path: ${{ env.PYTHON_APPIMAGE }}
  44. Release:
  45. needs: Build
  46. runs-on: ubuntu-latest
  47. if: github.ref == 'refs/heads/master'
  48. strategy:
  49. matrix:
  50. version: [2.7, 3.5, 3.6, 3.7, 3.8]
  51. steps:
  52. - uses: actions/download-artifact@v1
  53. with:
  54. name: python${{ matrix.version }}-appimages
  55. - name: Release
  56. uses: marvinpinto/action-automatic-releases@latest
  57. with:
  58. automatic_release_tag: python${{ matrix.version }}
  59. title: Python ${{ matrix.version }}
  60. files: |
  61. python${{ matrix.version }}-appimages/python*.AppImage
  62. repo_token: ${{ secrets.GITHUB_TOKEN }}