spine-godot.yml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. name: Build and Publish Godot editor and templates
  2. on:
  3. push:
  4. paths:
  5. - ".github/workflows/spine-godot.yml"
  6. - 'spine-godot/**'
  7. - 'spine-cpp/**'
  8. workflow_dispatch:
  9. env:
  10. AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
  11. AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  12. AWS_EC2_METADATA_DISABLED: true
  13. jobs:
  14. godot-editor-windows:
  15. runs-on: windows-latest
  16. steps:
  17. - uses: actions/checkout@v2
  18. with:
  19. fetch-depth: 0
  20. - name: Setup python and scons
  21. uses: ./.github/actions/setup-godot-deps
  22. - name: Build Godot artifact
  23. shell: bash
  24. run: |
  25. mkdir -p spine-godot/godot/bin/
  26. touch spine-godot/godot/bin/godot.windows.opt.tools.64.exe
  27. # ./spine-godot/build/setup.sh 3.4.4-stable false
  28. # ./spine-godot/build/build.sh release_debug
  29. - name: Upload artifacts
  30. uses: actions/upload-artifact@v2
  31. with:
  32. name: godot-editor-windows.zip
  33. path: spine-godot/godot/bin/godot.windows.opt.tools.64.exe
  34. godot-editor-linux:
  35. runs-on: ubuntu-18.04
  36. steps:
  37. - uses: actions/checkout@v2
  38. with:
  39. fetch-depth: 0
  40. - name: Setup python and scons
  41. uses: ./.github/actions/setup-godot-deps
  42. - name: Build Godot artifact
  43. shell: bash
  44. run: |
  45. mkdir -p spine-godot/godot/bin/
  46. touch spine-godot/godot/bin/godot.x11.opt.tools.64
  47. # ./spine-godot/build/setup.sh 3.4.4-stable false
  48. # ./spine-godot/build/build.sh release_debug
  49. - name: Upload artifacts
  50. uses: actions/upload-artifact@v2
  51. with:
  52. name: godot-editor-linux.zip
  53. path: spine-godot/godot/bin/godot.x11.opt.tools.64
  54. godot-editor-macos:
  55. runs-on: macos-latest
  56. steps:
  57. - uses: actions/checkout@v2
  58. with:
  59. fetch-depth: 0
  60. - name: Setup python and scons
  61. uses: ./.github/actions/setup-godot-deps
  62. - name: Build Godot artifact
  63. shell: bash
  64. run: |
  65. mkdir -p spine-godot/godot/bin/
  66. mkdir -p spine-godot/godot/bin/Godot.app
  67. pushd spine-godot/godot/bin
  68. zip -r godot-editor-macos.zip Godot.app
  69. popd
  70. # ./spine-godot/build/setup.sh 3.4.4-stable false
  71. # ./spine-godot/build/build.sh release_debug
  72. - name: Upload artifacts
  73. uses: actions/upload-artifact@v2
  74. with:
  75. name: godot-editor-macos.zip
  76. path: spine-godot/godot/bin/godot-editor-macos.zip
  77. godot-template-ios:
  78. runs-on: macos-latest
  79. steps:
  80. - uses: actions/checkout@v2
  81. with:
  82. fetch-depth: 0
  83. - name: Setup python and scons
  84. uses: ./.github/actions/setup-godot-deps
  85. - name: Build Godot artifact
  86. run: |
  87. mkdir -p spine-godot/godot/bin/
  88. touch spine-godot/godot/bin/iphone.zip
  89. # ./spine-godot/build/setup.sh 3.4.4-stable false
  90. # ./spine-godot/build/build-templates.sh ios
  91. - name: Upload artifacts
  92. uses: actions/upload-artifact@v2
  93. with:
  94. name: godot-template-ios.zip
  95. path: spine-godot/godot/bin/iphone.zip
  96. godot-template-macos:
  97. runs-on: macos-latest
  98. steps:
  99. - uses: actions/checkout@v2
  100. with:
  101. fetch-depth: 0
  102. - name: Setup python and scons
  103. uses: ./.github/actions/setup-godot-deps
  104. - name: Build Godot artifact
  105. run: |
  106. mkdir -p spine-godot/godot/bin/
  107. touch spine-godot/godot/bin/osx.zip
  108. # ./spine-godot/build/setup.sh 3.4.4-stable false
  109. # ./spine-godot/build/build-templates.sh macos
  110. - name: Upload artifacts
  111. uses: actions/upload-artifact@v2
  112. with:
  113. name: godot-template-macos.zip
  114. path: spine-godot/godot/bin/osx.zip
  115. godot-template-linux:
  116. runs-on: ubuntu-18.04
  117. steps:
  118. - uses: actions/checkout@v2
  119. with:
  120. fetch-depth: 0
  121. - name: Setup python and scons
  122. uses: ./.github/actions/setup-godot-deps
  123. - name: Build Godot artifact
  124. run: |
  125. mkdir -p spine-godot/godot/bin/
  126. touch spine-godot/godot/bin/linux_x11_64_debug
  127. touch spine-godot/godot/bin/linux_x11_64_release
  128. # sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev
  129. # ./spine-godot/build/setup.sh 3.4.4-stable false
  130. # ./spine-godot/build/build-templates.sh linux
  131. - name: Upload artifacts debug
  132. uses: actions/upload-artifact@v2
  133. with:
  134. name: godot-template-linux-debug.zip
  135. path: spine-godot/godot/bin/linux_x11_64_debug
  136. - name: Upload artifacts release
  137. uses: actions/upload-artifact@v2
  138. with:
  139. name: godot-template-linux-release.zip
  140. path: spine-godot/godot/bin/linux_x11_64_release
  141. godot-template-windows:
  142. runs-on: windows-latest
  143. steps:
  144. - uses: actions/checkout@v2
  145. with:
  146. fetch-depth: 0
  147. - name: Setup python and scons
  148. uses: ./.github/actions/setup-godot-deps
  149. - name: Build Godot artifact
  150. shell: bash
  151. run: |
  152. mkdir -p spine-godot/godot/bin/
  153. touch spine-godot/godot/bin/windows_64_debug.exe
  154. touch spine-godot/godot/bin/windows_64_release.exe
  155. # ./spine-godot/build/setup.sh 3.4.4-stable false
  156. # ./spine-godot/build/build-templates.sh windows
  157. - name: Upload artifacts debug
  158. uses: actions/upload-artifact@v2
  159. with:
  160. name: godot-template-windows-debug.zip
  161. path: spine-godot/godot/bin/windows_64_debug.exe
  162. - name: Upload artifacts release
  163. uses: actions/upload-artifact@v2
  164. with:
  165. name: godot-template-windows-release.zip
  166. path: spine-godot/godot/bin/windows_64_release.exe
  167. godot-template-android:
  168. runs-on: ubuntu-20.04
  169. steps:
  170. - uses: actions/checkout@v2
  171. with:
  172. fetch-depth: 0
  173. # Azure repositories are not reliable, we need to prevent azure giving us packages.
  174. - name: Make apt sources.list use the default Ubuntu repositories
  175. run: |
  176. sudo rm -f /etc/apt/sources.list.d/*
  177. sudo cp -f spine-godot/build/sources.list /etc/apt/sources.list
  178. sudo apt-get update
  179. - name: Set up Java 11
  180. uses: actions/setup-java@v1
  181. with:
  182. java-version: 11
  183. - name: Setup python and scons
  184. uses: ./.github/actions/setup-godot-deps
  185. - name: Build Godot artifact
  186. shell: bash
  187. run: |
  188. mkdir -p spine-godot/godot/bin/
  189. touch spine-godot/godot/bin/android_release.apk
  190. touch spine-godot/godot/bin/android_debug.apk
  191. touch spine-godot/godot/bin/android_source.zip
  192. # ./spine-godot/build/setup.sh 3.4.4-stable false
  193. # ./spine-godot/build/build-templates.sh android
  194. - name: Upload artifacts debug
  195. uses: actions/upload-artifact@v2
  196. with:
  197. name: godot-template-android-debug.zip
  198. path: spine-godot/godot/bin/android_debug.apk
  199. - name: Upload artifacts release
  200. uses: actions/upload-artifact@v2
  201. with:
  202. name: godot-template-android-release.zip
  203. path: spine-godot/godot/bin/android_release.apk
  204. - name: Upload artifacts source
  205. uses: actions/upload-artifact@v2
  206. with:
  207. name: godot-template-android-source.zip
  208. path: spine-godot/godot/bin/android_source.zip
  209. upload-to-s3:
  210. needs: [godot-editor-windows, godot-editor-linux, godot-editor-macos, godot-template-ios, godot-template-macos, godot-template-windows, godot-template-linux, godot-template-android]
  211. runs-on: ubuntu-latest
  212. steps:
  213. - name: Download godot-editor-windows artifact
  214. uses: actions/download-artifact@v2
  215. with:
  216. name: godot-editor-windows.zip
  217. - name: Download godot-editor-linux artifact
  218. uses: actions/download-artifact@v2
  219. with:
  220. name: godot-editor-linux.zip
  221. - name: Download godot-editor-macos artifact
  222. uses: actions/download-artifact@v2
  223. with:
  224. name: godot-editor-macos.zip
  225. - name: Download godot-template-ios artifact
  226. uses: actions/download-artifact@v2
  227. with:
  228. name: godot-template-ios.zip
  229. - name: Download godot-template-macos artifact
  230. uses: actions/download-artifact@v2
  231. with:
  232. name: godot-template-macos.zip
  233. - name: Download godot-template-windows-release artifact
  234. uses: actions/download-artifact@v2
  235. with:
  236. name: godot-template-windows-release.zip
  237. - name: Download godot-template-windows-debug artifact
  238. uses: actions/download-artifact@v2
  239. with:
  240. name: godot-template-windows-debug.zip
  241. - name: Download godot-template-linux-release artifact
  242. uses: actions/download-artifact@v2
  243. with:
  244. name: godot-template-linux-release.zip
  245. - name: Download godot-template-linux-debug artifact
  246. uses: actions/download-artifact@v2
  247. with:
  248. name: godot-template-linux-debug.zip
  249. - name: Download godot-template-android-release artifact
  250. uses: actions/download-artifact@v2
  251. with:
  252. name: godot-template-android-release.zip
  253. - name: Download godot-template-android-debug artifact
  254. uses: actions/download-artifact@v2
  255. with:
  256. name: godot-template-android-debug.zip
  257. - name: Download godot-template-android-source artifact
  258. uses: actions/download-artifact@v2
  259. with:
  260. name: godot-template-android-source.zip
  261. - name: Unpack editors and templates
  262. run: |
  263. ls -lah
  264. - name: Upload artifacts to S3
  265. shell: bash
  266. if: env.AWS_ACCESS_KEY_ID != null
  267. run: |
  268. aws s3 cp godot.windows.opt.tools.64.exe s3://spine-godot/spine-godot/3.4.4-stable/
  269. aws s3 cp godot.x11.opt.tools.64 s3://spine-godot/spine-godot/3.4.4-stable/
  270. aws s3 cp godot-editor-macos.zip s3://spine-godot/spine-godot/3.4.4-stable/