1
0

appimage.yml 2.4 KB

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