spine-godot-v4.yml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. name: Build spine-godot (Godot 4.x)
  2. on:
  3. workflow_call:
  4. inputs:
  5. godot_tag:
  6. required: true
  7. type: string
  8. default: "Godot tag not specified!"
  9. godot_version:
  10. required: true
  11. type: string
  12. default: "Godot version not specified!"
  13. godot_mono:
  14. required: true
  15. type: boolean
  16. default: false
  17. workflow_dispatch:
  18. inputs:
  19. godot_tag:
  20. required: true
  21. type: string
  22. default: "Godot tag not specified!"
  23. godot_version:
  24. required: true
  25. type: string
  26. default: "Godot version not specified!"
  27. godot_mono:
  28. required: true
  29. type: boolean
  30. default: false
  31. env:
  32. AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
  33. AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  34. AWS_EC2_METADATA_DISABLED: true
  35. EM_VERSION: 3.1.64
  36. GODOT_TAG: ${{ inputs.godot_tag }}
  37. GODOT_VERSION: ${{ inputs.godot_version }}
  38. GODOT_MONO: ${{ inputs.godot_mono }}
  39. GODOT_MONO_UPLOAD_SUFFIX: ${{ inputs.godot_mono == true && '-mono' || '' }}
  40. jobs:
  41. godot-editor-windows:
  42. runs-on: windows-2022
  43. steps:
  44. - uses: actions/checkout@v3
  45. with:
  46. fetch-depth: 0
  47. - name: Setup python and scons
  48. uses: ./.github/actions/setup-godot-deps-4
  49. - name: Build Godot artifact
  50. shell: bash
  51. run: |
  52. ./spine-godot/build/setup.sh $GODOT_TAG false $GODOT_MONO
  53. ./spine-godot/build/build-v4.sh $GODOT_MONO
  54. - name: Upload artifacts
  55. uses: actions/upload-artifact@v4
  56. with:
  57. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-windows', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  58. path: spine-godot/godot/bin/**/*
  59. godot-editor-linux:
  60. runs-on: ubuntu-22.04
  61. steps:
  62. - uses: actions/checkout@v3
  63. with:
  64. fetch-depth: 0
  65. - name: Setup python and scons
  66. uses: ./.github/actions/setup-godot-deps-4
  67. - name: Build Godot artifact
  68. shell: bash
  69. run: |
  70. sudo apt-get update
  71. 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
  72. ./spine-godot/build/setup.sh $GODOT_TAG false $GODOT_MONO
  73. ./spine-godot/build/build-v4.sh $GODOT_MONO
  74. - name: Upload artifacts
  75. uses: actions/upload-artifact@v4
  76. with:
  77. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-linux', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  78. path: spine-godot/godot/bin/**/*
  79. godot-editor-macos:
  80. runs-on: macos-latest
  81. steps:
  82. - uses: actions/checkout@v3
  83. with:
  84. fetch-depth: 0
  85. - name: Setup python and scons
  86. uses: ./.github/actions/setup-godot-deps-4
  87. - name: Build Godot artifact
  88. shell: bash
  89. run: |
  90. ./spine-godot/build/install-macos-vulkan-sdk.sh
  91. ./spine-godot/build/setup.sh $GODOT_TAG false $GODOT_MONO
  92. ./spine-godot/build/build-v4.sh $GODOT_MONO
  93. pushd spine-godot/godot/bin
  94. zip -r godot-editor-macos.zip Godot.app
  95. popd
  96. - name: Upload artifacts
  97. uses: actions/upload-artifact@v4
  98. with:
  99. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-macos', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  100. path: spine-godot/godot/bin/godot-editor-macos.zip
  101. godot-template-ios:
  102. runs-on: macos-latest
  103. if: ${{ inputs.godot_mono == false }}
  104. steps:
  105. - uses: actions/checkout@v3
  106. with:
  107. fetch-depth: 0
  108. - name: Setup python and scons
  109. uses: ./.github/actions/setup-godot-deps-4
  110. - name: Build Godot artifact
  111. run: |
  112. ./spine-godot/build/install-macos-vulkan-sdk.sh
  113. ./spine-godot/build/setup.sh $GODOT_TAG false
  114. ./spine-godot/build/build-templates-v4.sh ios
  115. - name: Upload artifacts
  116. uses: actions/upload-artifact@v4
  117. with:
  118. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-ios', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  119. path: spine-godot/godot/bin/ios.zip
  120. godot-template-macos:
  121. runs-on: macos-latest
  122. steps:
  123. - uses: actions/checkout@v3
  124. with:
  125. fetch-depth: 0
  126. - name: Setup python and scons
  127. uses: ./.github/actions/setup-godot-deps-4
  128. - name: Build Godot artifact
  129. run: |
  130. ./spine-godot/build/install-macos-vulkan-sdk.sh
  131. ./spine-godot/build/setup.sh $GODOT_TAG false $GODOT_MONO
  132. ./spine-godot/build/build-templates-v4.sh macos $GODOT_MONO
  133. - name: Upload artifacts
  134. uses: actions/upload-artifact@v4
  135. with:
  136. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-macos', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  137. path: spine-godot/godot/bin/macos.zip
  138. godot-template-linux:
  139. runs-on: ubuntu-22.04
  140. steps:
  141. - uses: actions/checkout@v3
  142. with:
  143. fetch-depth: 0
  144. - name: Setup python and scons
  145. uses: ./.github/actions/setup-godot-deps-4
  146. - name: Build Godot artifact
  147. run: |
  148. sudo apt-get update
  149. 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
  150. ./spine-godot/build/setup.sh $GODOT_TAG false $GODOT_MONO
  151. ./spine-godot/build/build-templates-v4.sh linux $GODOT_MONO
  152. - name: Upload artifacts debug
  153. uses: actions/upload-artifact@v4
  154. with:
  155. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-linux-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  156. path: spine-godot/godot/bin/linux_debug.x86_64
  157. - name: Upload artifacts release
  158. uses: actions/upload-artifact@v4
  159. with:
  160. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-linux-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  161. path: spine-godot/godot/bin/linux_release.x86_64
  162. godot-template-windows:
  163. runs-on: windows-latest
  164. steps:
  165. - uses: actions/checkout@v3
  166. with:
  167. fetch-depth: 0
  168. - name: Setup python and scons
  169. uses: ./.github/actions/setup-godot-deps-4
  170. - name: Build Godot artifact
  171. shell: bash
  172. run: |
  173. ./spine-godot/build/setup.sh $GODOT_TAG false $GODOT_MONO
  174. ./spine-godot/build/build-templates-v4.sh windows $GODOT_MONO
  175. - name: Upload artifacts debug
  176. uses: actions/upload-artifact@v4
  177. with:
  178. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-windows-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  179. path: spine-godot/godot/bin/windows_debug_x86_64.exe
  180. - name: Upload artifacts release
  181. uses: actions/upload-artifact@v4
  182. with:
  183. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-windows-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  184. path: spine-godot/godot/bin/windows_release_x86_64.exe
  185. godot-template-android:
  186. runs-on: ubuntu-latest
  187. if: ${{ inputs.godot_mono == false }}
  188. steps:
  189. - uses: actions/checkout@v3
  190. with:
  191. fetch-depth: 0
  192. # Azure repositories are not reliable, we need to prevent azure giving us packages.
  193. - name: Make apt sources.list use the default Ubuntu repositories
  194. run: |
  195. sudo rm -f /etc/apt/sources.list.d/*
  196. sudo cp -f spine-godot/build/sources.lst /etc/apt/sources.list
  197. sudo apt-get update
  198. - name: Set up Java 17
  199. uses: actions/setup-java@v4
  200. with:
  201. distribution: temurin
  202. java-version: 17
  203. - name: Setup python and scons
  204. uses: ./.github/actions/setup-godot-deps-4
  205. - name: Build Godot artifact
  206. shell: bash
  207. run: |
  208. ./spine-godot/build/setup.sh $GODOT_TAG false
  209. ./spine-godot/build/build-templates-v4.sh android
  210. - name: Upload artifacts debug
  211. uses: actions/upload-artifact@v4
  212. with:
  213. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-android-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  214. path: spine-godot/godot/bin/android_debug.apk
  215. - name: Upload artifacts release
  216. uses: actions/upload-artifact@v4
  217. with:
  218. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-android-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  219. path: spine-godot/godot/bin/android_release.apk
  220. - name: Upload artifacts source
  221. uses: actions/upload-artifact@v4
  222. with:
  223. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-android-source', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  224. path: spine-godot/godot/bin/android_source.zip
  225. godot-template-web:
  226. runs-on: ubuntu-latest
  227. if: ${{ inputs.godot_mono == false }}
  228. steps:
  229. - uses: actions/checkout@v3
  230. with:
  231. fetch-depth: 0
  232. - name: Set up Emscripten latest
  233. uses: mymindstorm/setup-emsdk@v11
  234. with:
  235. version: ${{env.EM_VERSION}}
  236. - name: Verify Emscripten setup
  237. run: |
  238. emcc -v
  239. - name: Setup python and scons
  240. uses: ./.github/actions/setup-godot-deps-4
  241. - name: Build Godot artifact
  242. run: |
  243. ./spine-godot/build/setup.sh $GODOT_TAG false
  244. ./spine-godot/build/build-templates-v4.sh web
  245. - name: Upload artifacts debug
  246. uses: actions/upload-artifact@v4
  247. with:
  248. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  249. path: spine-godot/godot/bin/web_debug.zip
  250. - name: Upload artifacts release
  251. uses: actions/upload-artifact@v4
  252. with:
  253. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  254. path: spine-godot/godot/bin/web_release.zip
  255. - name: Upload artifacts no threads debug
  256. uses: actions/upload-artifact@v4
  257. with:
  258. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-nothreads-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  259. path: spine-godot/godot/bin/web_nothreads_debug.zip
  260. - name: Upload artifacts no threads release
  261. uses: actions/upload-artifact@v4
  262. with:
  263. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-nothreads-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  264. path: spine-godot/godot/bin/web_nothreads_release.zip
  265. - name: Upload artifacts dlink debug
  266. uses: actions/upload-artifact@v4
  267. with:
  268. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-dlink-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  269. path: spine-godot/godot/bin/web_dlink_debug.zip
  270. - name: Upload artifacts dlink release
  271. uses: actions/upload-artifact@v4
  272. with:
  273. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-dlink-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  274. path: spine-godot/godot/bin/web_dlink_release.zip
  275. - name: Upload artifacts dlink nothreads debug
  276. uses: actions/upload-artifact@v4
  277. with:
  278. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-dlink-nothreads-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  279. path: spine-godot/godot/bin/web_dlink_nothreads_debug.zip
  280. - name: Upload artifacts dlink nothreads release
  281. uses: actions/upload-artifact@v4
  282. with:
  283. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-dlink-nothreads-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  284. path: spine-godot/godot/bin/web_dlink_nothreads_release.zip
  285. upload-to-s3:
  286. 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, godot-template-web]
  287. runs-on: ubuntu-latest
  288. if: ${{ inputs.godot_mono == false }}
  289. steps:
  290. - name: Download godot-editor-windows artifact
  291. uses: actions/download-artifact@v4
  292. with:
  293. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-windows', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  294. - name: Download godot-editor-linux artifact
  295. uses: actions/download-artifact@v4
  296. with:
  297. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-linux', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  298. - name: Download godot-editor-macos artifact
  299. uses: actions/download-artifact@v4
  300. with:
  301. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-macos', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  302. - name: Download godot-template-ios artifact
  303. uses: actions/download-artifact@v4
  304. with:
  305. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-ios', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  306. - name: Download godot-template-macos artifact
  307. uses: actions/download-artifact@v4
  308. with:
  309. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-macos', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  310. - name: Download godot-template-windows-release artifact
  311. uses: actions/download-artifact@v4
  312. with:
  313. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-windows-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  314. - name: Download godot-template-windows-debug artifact
  315. uses: actions/download-artifact@v4
  316. with:
  317. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-windows-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  318. - name: Download godot-template-linux-release artifact
  319. uses: actions/download-artifact@v4
  320. with:
  321. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-linux-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  322. - name: Download godot-template-linux-debug artifact
  323. uses: actions/download-artifact@v4
  324. with:
  325. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-linux-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  326. - name: Download godot-template-android-release artifact
  327. uses: actions/download-artifact@v4
  328. with:
  329. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-android-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  330. - name: Download godot-template-android-debug artifact
  331. uses: actions/download-artifact@v4
  332. with:
  333. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-android-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  334. - name: Download godot-template-android-source artifact
  335. uses: actions/download-artifact@v4
  336. with:
  337. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-android-source', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  338. - name: Download godot-template-web-release artifact
  339. uses: actions/download-artifact@v4
  340. with:
  341. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  342. - name: Download godot-template-web-debug artifact
  343. uses: actions/download-artifact@v4
  344. with:
  345. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  346. - name: Download godot-template-web-nothreads-release artifact
  347. uses: actions/download-artifact@v4
  348. with:
  349. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-nothreads-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  350. - name: Download godot-template-web-nothreads-debug artifact
  351. uses: actions/download-artifact@v4
  352. with:
  353. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-nothreads-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  354. - name: Download godot-template-web-dlink-release artifact
  355. uses: actions/download-artifact@v4
  356. with:
  357. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-dlink-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  358. - name: Download godot-template-web-dlink-debug artifact
  359. uses: actions/download-artifact@v4
  360. with:
  361. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-dlink-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  362. - name: Download godot-template-web-dlink-nothreads-release artifact
  363. uses: actions/download-artifact@v4
  364. with:
  365. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-dlink-nothreads-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  366. - name: Download godot-template-web-dlink-nothreads-debug artifact
  367. uses: actions/download-artifact@v4
  368. with:
  369. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-web-dlink-nothreads-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  370. - name: Upload artifacts to S3
  371. shell: bash
  372. if: env.AWS_ACCESS_KEY_ID != null
  373. run: |
  374. BRANCH=${GITHUB_REF#refs/heads/}
  375. echo "branch: $BRANCH"
  376. mv godot.windows.editor.x86_64.exe godot-$BRANCH-$GODOT_TAG.exe
  377. mv godot.linuxbsd.editor.x86_64 godot-$BRANCH-$GODOT_TAG
  378. zip godot-editor-windows.zip godot-$BRANCH-$GODOT_TAG.exe
  379. zip godot-editor-linux.zip godot-$BRANCH-$GODOT_TAG
  380. aws s3 cp godot-editor-windows.zip s3://spine-godot/$BRANCH/$GODOT_TAG/
  381. aws s3 cp godot-editor-linux.zip s3://spine-godot/$BRANCH/$GODOT_TAG/
  382. aws s3 cp godot-editor-macos.zip s3://spine-godot/$BRANCH/$GODOT_TAG/
  383. echo "$GODOT_VERSION" > version.txt
  384. GODOT_MAJOR_MINOR=$(echo "$GODOT_VERSION" | sed -E 's/^([0-9]+\.[0-9]+).*/\1/')
  385. echo "Major.Minor version: $GODOT_MAJOR_MINOR"
  386. if [[ $(echo "$GODOT_MAJOR_MINOR >= 4.3" | bc) -eq 1 ]]; then
  387. echo "Version >= 4.3. Adding all web_xxx.zip files to template zip."
  388. WEB_FILES=(web_debug.zip web_release.zip web_nothreads_debug.zip web_nothreads_release.zip web_dlink_debug.zip web_dlink_nothreads_debug.zip web_dlink_release.zip web_dlink_nothreads_release.zip)
  389. else
  390. echo "Version < 4.3. Adding only web_debug.zip and web_release.zip."
  391. WEB_FILES=(web_debug.zip web_release.zip)
  392. fi
  393. echo "Web files to include: ${WEB_FILES[@]}"
  394. zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip ios.zip macos.zip \
  395. windows_debug_x86_64.exe windows_release_x86_64.exe \
  396. linux_debug.x86_64 linux_release.x86_64 "${WEB_FILES[@]}" \
  397. android_release.apk android_debug.apk android_source.zip version.txt
  398. aws s3 cp spine-godot-templates-$BRANCH-$GODOT_TAG.zip s3://spine-godot/$BRANCH/$GODOT_TAG/spine-godot-templates-$BRANCH-$GODOT_TAG.tpz
  399. upload-to-s3-mono:
  400. needs: [godot-editor-windows, godot-editor-linux, godot-editor-macos, godot-template-macos, godot-template-windows, godot-template-linux]
  401. runs-on: ubuntu-latest
  402. if: ${{ inputs.godot_mono == true }}
  403. steps:
  404. - name: Download godot-editor-windows artifact
  405. uses: actions/download-artifact@v4
  406. with:
  407. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-windows', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  408. - name: Download godot-editor-linux artifact
  409. uses: actions/download-artifact@v4
  410. with:
  411. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-linux', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  412. - name: Download godot-editor-macos artifact
  413. uses: actions/download-artifact@v4
  414. with:
  415. name: ${{ format('{0}-{1}{2}.zip', 'godot-editor-macos', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  416. - name: Download godot-template-macos artifact
  417. uses: actions/download-artifact@v4
  418. with:
  419. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-macos', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  420. - name: Download godot-template-windows-release artifact
  421. uses: actions/download-artifact@v4
  422. with:
  423. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-windows-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  424. - name: Download godot-template-windows-debug artifact
  425. uses: actions/download-artifact@v4
  426. with:
  427. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-windows-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  428. - name: Download godot-template-linux-release artifact
  429. uses: actions/download-artifact@v4
  430. with:
  431. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-linux-release', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  432. - name: Download godot-template-linux-debug artifact
  433. uses: actions/download-artifact@v4
  434. with:
  435. name: ${{ format('{0}-{1}{2}.zip', 'godot-template-linux-debug', env.GODOT_TAG, env.GODOT_MONO_UPLOAD_SUFFIX) }}
  436. - name: Upload artifacts to S3
  437. shell: bash
  438. if: env.AWS_ACCESS_KEY_ID != null
  439. run: |
  440. BRANCH=${GITHUB_REF#refs/heads/}
  441. echo "branch: $BRANCH"
  442. ls -lahR
  443. mv godot.windows.editor.x86_64.mono.exe godot-$BRANCH-$GODOT_TAG-mono.exe
  444. mv godot.linuxbsd.editor.x86_64.mono godot-$BRANCH-$GODOT_TAG-mono
  445. zip -r godot-editor-windows-mono.zip godot-$BRANCH-$GODOT_TAG-mono.exe GodotSharp
  446. zip -r godot-editor-linux-mono.zip godot-$BRANCH-$GODOT_TAG-mono GodotSharp
  447. mv godot-editor-macos.zip godot-editor-macos-mono.zip
  448. aws s3 cp godot-editor-windows-mono.zip s3://spine-godot/$BRANCH/$GODOT_TAG/
  449. aws s3 cp godot-editor-linux-mono.zip s3://spine-godot/$BRANCH/$GODOT_TAG/
  450. aws s3 cp godot-editor-macos-mono.zip s3://spine-godot/$BRANCH/$GODOT_TAG/
  451. echo "$GODOT_VERSION.mono" > version.txt
  452. zip spine-godot-templates-$BRANCH-$GODOT_TAG-mono.zip macos.zip windows_debug_x86_64.exe windows_release_x86_64.exe linux_debug.x86_64 linux_release.x86_64 version.txt
  453. aws s3 cp spine-godot-templates-$BRANCH-$GODOT_TAG-mono.zip s3://spine-godot/$BRANCH/$GODOT_TAG/spine-godot-templates-$BRANCH-$GODOT_TAG-mono.tpz