build.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. name: Build
  2. on: push
  3. jobs:
  4. build-windows-msi:
  5. name: Windows Build (MSI)
  6. runs-on: windows-latest
  7. steps:
  8. - name: Install Qt
  9. uses: jurplel/install-qt-action@v3
  10. with:
  11. version: 5.15.2
  12. arch: win32_msvc2019
  13. cache: true
  14. - name: Checkout Repo
  15. uses: actions/checkout@v4
  16. - name: Download Tools
  17. run: python scripts\download.py
  18. - name: Download OpenSSL
  19. run: choco install -y openssl.light --version=1.1.1.20181020 --x86 --params "/InstallDir:C:\OpenSSL"
  20. - name: Build MSI Package
  21. id: build
  22. shell: cmd
  23. run: |
  24. set QTDIR=%Qt5_DIR%
  25. set OPENSSL=C:\OpenSSL
  26. set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin
  27. call scripts\windows\packages\msi\build.msi.bat || exit
  28. set /p VERSION=<VERSION
  29. echo VERSION=%VERSION%>>%GITHUB_ENV%
  30. - name: Upload Assets
  31. uses: ncipollo/release-action@v1
  32. with:
  33. artifacts: apk-editor-studio_windows_${{ env.VERSION }}.msi
  34. artifactErrorsFailBuild: true
  35. allowUpdates: true
  36. omitName: true
  37. omitBody: true
  38. prerelease: true
  39. tag: development
  40. token: ${{ secrets.GITHUB_TOKEN }}
  41. build-windows-zip:
  42. name: Windows Build (ZIP)
  43. runs-on: windows-latest
  44. steps:
  45. - name: Install Qt
  46. uses: jurplel/install-qt-action@v3
  47. with:
  48. version: 5.15.2
  49. arch: win32_msvc2019
  50. cache: true
  51. - name: Checkout Repo
  52. uses: actions/checkout@v4
  53. - name: Download Tools
  54. run: python scripts\download.py
  55. - name: Download OpenSSL
  56. run: choco install -y openssl.light --version=1.1.1.20181020 --x86 --params "/InstallDir:C:\OpenSSL"
  57. - name: Build ZIP Package
  58. id: build
  59. shell: cmd
  60. run: |
  61. set QTDIR=%Qt5_DIR%
  62. set OPENSSL=C:\OpenSSL
  63. call "scripts\windows\packages\zip\build.zip.bat" || exit
  64. set /p VERSION=<VERSION
  65. echo VERSION=%VERSION%>>%GITHUB_ENV%
  66. - name: Upload Assets
  67. uses: ncipollo/release-action@v1
  68. with:
  69. artifacts: apk-editor-studio_windows_${{ env.VERSION }}.zip
  70. artifactErrorsFailBuild: true
  71. allowUpdates: true
  72. omitName: true
  73. omitBody: true
  74. prerelease: true
  75. tag: development
  76. token: ${{ secrets.GITHUB_TOKEN }}
  77. build-linux-appimage:
  78. name: Linux Build (AppImage)
  79. runs-on: ubuntu-20.04
  80. steps:
  81. - name: Install Dependencies
  82. run: |
  83. sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal -y
  84. sudo apt-get update -qq
  85. sudo apt-get install qt515base qt515imageformats qt515svg qt515tools libgl1-mesa-dev libsecret-1-dev adb zipalign
  86. - name: Checkout Repo
  87. uses: actions/checkout@v4
  88. - name: Download Tools
  89. run: python3 scripts/download.py
  90. - name: Build AppImage Package
  91. id: build
  92. run: |
  93. source /opt/qt515/bin/qt515-env.sh || true
  94. scripts/linux/packages/appimage/build.appimage.sh
  95. echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
  96. - name: Upload Assets
  97. uses: ncipollo/release-action@v1
  98. with:
  99. artifacts: scripts/linux/packages/appimage/apk-editor-studio_linux_${{ env.VERSION }}.AppImage
  100. artifactErrorsFailBuild: true
  101. allowUpdates: true
  102. omitName: true
  103. omitBody: true
  104. prerelease: true
  105. tag: development
  106. token: ${{ secrets.GITHUB_TOKEN }}
  107. build-macos:
  108. name: macOS Build (APP, DMG)
  109. runs-on: macos-12
  110. steps:
  111. - name: Install Qt
  112. uses: jurplel/install-qt-action@v3
  113. with:
  114. version: 5.15.2
  115. cache: true
  116. - name: Checkout Repo
  117. uses: actions/checkout@v4
  118. - name: Download Tools
  119. run: python3 scripts/download.py
  120. - name: Build APP/DMG Package
  121. id: build
  122. run: |
  123. scripts/macos/packages/app/build.app.command
  124. npm i appdmg
  125. scripts/macos/packages/dmg/build.dmg.command
  126. echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
  127. - name: Upload Assets
  128. uses: ncipollo/release-action@v1
  129. with:
  130. artifacts: scripts/macos/packages/app/apk-editor-studio_macos_${{ env.VERSION }}.app.zip,scripts/macos/packages/dmg/apk-editor-studio_macos_${{ env.VERSION }}.dmg
  131. artifactErrorsFailBuild: true
  132. allowUpdates: true
  133. omitName: true
  134. omitBody: true
  135. prerelease: true
  136. tag: development
  137. token: ${{ secrets.GITHUB_TOKEN }}