appimage.yml 2.0 KB

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