appimage.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 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. with:
  41. name: python${{ env.PYTHON_VERSION }}-appimages
  42. path: ${{ env.PYTHON_APPIMAGE }}
  43. Release:
  44. needs: Build
  45. runs-on: ubuntu-latest
  46. strategy:
  47. matrix:
  48. version: [2.7, 3.5, 3.6, 3.7, 3.8]
  49. steps:
  50. - uses: actions/download-artifact@v1
  51. with:
  52. name: python${{ matrix.version }}-appimages
  53. - name: Release
  54. uses: marvinpinto/action-automatic-releases@latest
  55. with:
  56. automatic_release_tag: python${{ matrix.version }}
  57. title: Python ${{ matrix.version }}
  58. files: |
  59. python${{ matrix.version }}-appimages/python*.AppImage
  60. repo_token: ${{ secrets.GITHUB_TOKEN }}