8
8
branches : [main]
9
9
10
10
env :
11
+ BUILD_ASSETS_FOLDER : ./.github/build
11
12
BUILD_TYPE : ${{ fromJSON('["dev", "release"]')[startsWith(github.ref, 'refs/tags/v')] }}
12
- CORE_LOVE_PACKAGE_PATH : ./core.love
13
+ COLD_CLEAR_DOWNLOAD_URL : https://github.com/26F-Studio/cold_clear_ai_love2d_wrapper/releases/download/11.4
13
14
CORE_LOVE_ARTIFACT_NAME : core_love_package
15
+ CORE_LOVE_PACKAGE_PATH : ./core.love
14
16
15
17
jobs :
16
18
get-info :
@@ -101,7 +103,7 @@ jobs:
101
103
path : ${{ env.CORE_LOVE_PACKAGE_PATH }}
102
104
- name : Add icon to love package
103
105
run : |
104
- cp ./.github/build /linux/${{ env.BUILD_TYPE }}/icon.png media/image/icon.png
106
+ cp ${{ env.BUILD_ASSETS_FOLDER }} /linux/${{ env.BUILD_TYPE }}/icon.png media/image/icon.png
105
107
zip -u ${{ env.CORE_LOVE_PACKAGE_PATH }} media/image/icon.png
106
108
rm media/image/icon.png
107
109
- name : Rename love package
@@ -167,6 +169,7 @@ jobs:
167
169
needs : [get-info, build-core, auto-test]
168
170
if : github.event_name != 'pull_request'
169
171
env :
172
+ COLD_CLEAR_FOLDER : ./libAndroid
170
173
OUTPUT_FOLDER : ./build
171
174
RELEASE_FOLDER : ./release
172
175
steps :
@@ -179,6 +182,7 @@ jobs:
179
182
run : |
180
183
import os
181
184
import re
185
+
182
186
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
183
187
if "${{ env.BUILD_TYPE }}" == "dev":
184
188
f.write('bundle-id=org.f26_studio.' + re.sub(r'[^A-Za-z0-9]+', '_', '${{ needs.get-info.outputs.app-name }}') + '.snapshot\n')
@@ -191,10 +195,10 @@ jobs:
191
195
with :
192
196
name : ${{ env.CORE_LOVE_ARTIFACT_NAME }}
193
197
- name : Download ColdClear
194
- uses : ./.github/actions/get-cc
198
+ uses : ./.github/actions/get-unzip
195
199
with :
196
- platform : Android
197
- dir : ./libAndroid
200
+ url : ${{ env.COLD_CLEAR_DOWNLOAD_URL }}/ Android.zip
201
+ dir : ${{ env.COLD_CLEAR_FOLDER }}
198
202
- name : Build Android packages
199
203
id : build-packages
200
204
uses : love-actions/love-actions-android@main
@@ -207,8 +211,8 @@ jobs:
207
211
keystore-key-password : ${{ secrets.ANDROID_KEYSTORE_KEYPASSWORD }}
208
212
keystore-store-password : ${{ secrets.ANDROID_KEYSTORE_STOREPASSWORD }}
209
213
love-package : ${{ env.CORE_LOVE_PACKAGE_PATH }}
210
- resource-path : ./.github/build /android/${{ env.BUILD_TYPE }}/res
211
- extra-assets : ./libAndroid/
214
+ resource-path : ${{ env.BUILD_ASSETS_FOLDER }} /android/${{ env.BUILD_TYPE }}/res
215
+ extra-assets : ${{ env.COLD_CLEAR_FOLDER }}
212
216
custom-scheme : studio26f://oauth
213
217
product-name : ${{ steps.process-app-name.outputs.product-name }}
214
218
version-string : ${{ needs.get-info.outputs.version-string }}
@@ -238,8 +242,8 @@ jobs:
238
242
build-linux :
239
243
runs-on : ubuntu-latest
240
244
needs : [get-info, build-core, auto-test]
241
- if : ${{ !always()}}
242
245
env :
246
+ COLD_CLEAR_FOLDER : ./ColdClear
243
247
OUTPUT_FOLDER : ./build
244
248
RELEASE_FOLDER : ./release
245
249
steps :
@@ -263,18 +267,18 @@ jobs:
263
267
name : ${{ env.CORE_LOVE_ARTIFACT_NAME }}
264
268
- name : Add icon to love package
265
269
run : |
266
- cp ./.github/build /linux/${{ env.BUILD_TYPE }}/icon.png media/image/icon.png
270
+ cp ${{ env.BUILD_ASSETS_FOLDER }} /linux/${{ env.BUILD_TYPE }}/icon.png media/image/icon.png
267
271
zip -u ${{ env.CORE_LOVE_PACKAGE_PATH }} media/image/icon.png
268
272
rm media/image/icon.png
269
273
- name : Download ColdClear
270
- uses : ./.github/actions/get-cc
274
+ uses : ./.github/actions/get-unzip
271
275
with :
272
- platform : Linux
273
- dir : ./ColdClear
276
+ url : ${{ env.COLD_CLEAR_DOWNLOAD_URL }}/ Linux.zip
277
+ dir : ${{ env.COLD_CLEAR_FOLDER }}
274
278
- name : Process ColdClear
275
279
shell : bash
276
280
run : |
277
- cd ./ColdClear
281
+ cd ${{ env.COLD_CLEAR_FOLDER }}
278
282
mkdir -p ./lib/lua/5.1
279
283
mv ./x64/CCloader.so ./lib/lua/5.1
280
284
- name : Build Linux packages
@@ -285,9 +289,9 @@ jobs:
285
289
bundle-id : ${{ steps.process-app-name.outputs.bundle-id }}
286
290
description : Techmino is fun!
287
291
version-string : ${{ needs.get-info.outputs.version-string }}
288
- icon-path : ./.github/build /linux/${{ env.BUILD_TYPE }}/icon.png
292
+ icon-path : ${{ env.BUILD_ASSETS_FOLDER }} /linux/${{ env.BUILD_TYPE }}/icon.png
289
293
love-package : ${{ env.CORE_LOVE_PACKAGE_PATH }}
290
- lib-path : ./ColdClear /lib
294
+ lib-path : ${{ env.COLD_CLEAR_FOLDER }} /lib
291
295
product-name : ${{ steps.process-app-name.outputs.product-name }}
292
296
output-folder : ${{ env.OUTPUT_FOLDER }}
293
297
- name : Upload AppImage artifact
@@ -322,9 +326,9 @@ jobs:
322
326
build-macos-portable :
323
327
runs-on : macos-latest
324
328
needs : [get-info, build-core, auto-test]
325
- # if: github.event_name != 'pull_request'
326
- if : ${{ !always()}}
329
+ if : github.event_name != 'pull_request'
327
330
env :
331
+ COLD_CLEAR_FOLDER : ./ColdClear
328
332
OUTPUT_FOLDER : ./build
329
333
RELEASE_FOLDER : ./release
330
334
steps :
@@ -345,31 +349,31 @@ jobs:
345
349
with :
346
350
name : ${{ env.CORE_LOVE_ARTIFACT_NAME }}
347
351
- name : Download ColdClear
348
- uses : ./.github/actions/get-cc
352
+ uses : ./.github/actions/get-unzip
349
353
with :
350
- platform : macOS
351
- dir : ./ColdClear
354
+ url : ${{ env.COLD_CLEAR_DOWNLOAD_URL }}/ macOS.zip
355
+ dir : ${{ env.COLD_CLEAR_FOLDER }}
352
356
- name : Process ColdClear
353
357
shell : bash
354
358
run : |
355
- rm ./ColdClear /universal/libcold_clear.a
356
- - name : Use Xcode 15.3
357
- # Xcode 15.4 segfaults
358
- # see https://forums.developer.apple.com/forums/thread/757398
359
- uses : mobiledevops/xcode-select-version-action@v1
360
- with :
361
- xcode-select-version : 15.3
359
+ rm ${{ env.COLD_CLEAR_FOLDER }} /universal/libcold_clear.a
360
+ # - name: Use Xcode 15.3
361
+ # # Xcode 15.4 segfaults
362
+ # # see https://forums.developer.apple.com/forums/thread/757398
363
+ # uses: mobiledevops/xcode-select-version-action@v1
364
+ # with:
365
+ # xcode-select-version: 15.3
362
366
- name : Build macOS packages
363
367
id : build-packages
364
368
uses : love-actions/love-actions-macos-portable@v1
365
369
with :
366
370
app-name : ${{ needs.get-info.outputs.app-name }}
367
371
bundle-id : ${{ steps.process-app-name.outputs.bundle-id }}
368
372
copyright : " Copyright © 2019-2023 26F-Studio. Some Rights Reserved."
369
- icon-path : ./.github/build /macOS/${{ env.BUILD_TYPE }}/icon.icns
370
- love-ref : " 11.5 "
373
+ icon-path : ${{ env.BUILD_ASSETS_FOLDER }} /macOS/${{ env.BUILD_TYPE }}/icon.icns
374
+ love-ref : " 11.4 "
371
375
love-package : ${{ env.CORE_LOVE_PACKAGE_PATH }}
372
- libs-path : ./ColdClear /universal/
376
+ libs-path : ${{ env.COLD_CLEAR_FOLDER }} /universal/
373
377
product-name : ${{ steps.process-app-name.outputs.product-name }}
374
378
version-string : ${{ needs.get-info.outputs.version-string }}
375
379
output-folder : ${{ env.OUTPUT_FOLDER }}
@@ -380,12 +384,12 @@ jobs:
380
384
developer-id-application-password : ${{ secrets.APPLE_CERT_DEVELOPER_ID_APPLICATION_PWD }}
381
385
developer-id-installer-base64 : ${{ secrets.APPLE_CERT_DEVELOPER_ID_INSTALLER }}
382
386
developer-id-installer-password : ${{ secrets.APPLE_CERT_DEVELOPER_ID_INSTALLER_PWD }}
383
- dmg-background-path : ./.github/build /macOS/${{ env.BUILD_TYPE }}/dmg.png
387
+ dmg-background-path : ${{ env.BUILD_ASSETS_FOLDER }} /macOS/${{ env.BUILD_TYPE }}/dmg.png
384
388
dmg-icon-position : " 239 203"
385
389
dmg-icon-size : " 100"
386
390
dmg-link-position : " 565 203"
387
391
dmg-text-size : " 12"
388
- dmg-volume-icon-path : ./.github/build /macOS/${{ env.BUILD_TYPE }}/dmg.icns
392
+ dmg-volume-icon-path : ${{ env.BUILD_ASSETS_FOLDER }} /macOS/${{ env.BUILD_TYPE }}/dmg.icns
389
393
dmg-volume-name : ${{ steps.process-app-name.outputs.product-name }}
390
394
dmg-window-position : " 200 120"
391
395
dmg-window-size : " 800 500"
@@ -423,7 +427,7 @@ jobs:
423
427
name : ${{ needs.get-info.outputs.update-title }}
424
428
prerelease : ${{ startsWith(github.ref, 'refs/tags/pre') }}
425
429
426
- build-web :
430
+ build-web-compat :
427
431
runs-on : ubuntu-latest
428
432
needs : [get-info, build-core, auto-test]
429
433
if : ${{ !always()}}
@@ -443,7 +447,7 @@ jobs:
443
447
npx love.js ${{ env.CORE_LOVE_PACKAGE_PATH }} ${{ env.OUTPUT_FOLDER }} -t "${{ needs.get-info.outputs.app-name }}" -m ${{ env.MEMORY_LIMIT }} -c
444
448
- name : Move assets
445
449
run : |
446
- mv ./.github/build /web/${{ env.BUILD_TYPE }}/* ${{ env.OUTPUT_FOLDER }}
450
+ mv ${{ env.BUILD_ASSETS_FOLDER }} /web/${{ env.BUILD_TYPE }}/* ${{ env.OUTPUT_FOLDER }}
447
451
- name : Initialize Love.js Api Player
448
452
run : |
449
453
pushd ${{ env.OUTPUT_FOLDER }}
@@ -472,6 +476,7 @@ jobs:
472
476
needs : [get-info, build-core, auto-test]
473
477
if : ${{ !always()}}
474
478
env :
479
+ COLD_CLEAR_FOLDER : ./ColdClear
475
480
OUTPUT_FOLDER : ./build
476
481
RELEASE_FOLDER : ./release
477
482
steps :
@@ -491,16 +496,16 @@ jobs:
491
496
with :
492
497
name : ${{ env.CORE_LOVE_ARTIFACT_NAME }}
493
498
- name : Download ColdClear
494
- uses : ./.github/actions/get-cc
499
+ uses : ./.github/actions/get-unzip
495
500
with :
496
- platform : Windows
497
- dir : ./ColdClear
501
+ url : ${{ env.COLD_CLEAR_DOWNLOAD_URL }}/ Windows.zip
502
+ dir : ${{ env.COLD_CLEAR_FOLDER }}
498
503
- name : Update Windows template
499
504
shell : python3 {0}
500
505
run : |
501
506
version_string = "${{ needs.get-info.outputs.version-string }}"
502
507
file_version = (f"{version_string.replace('.', ',')},0")
503
- with open("./.github/build /windows/${{ env.BUILD_TYPE }}/template.rc", "r+", encoding="utf8") as file:
508
+ with open("${{ env.BUILD_ASSETS_FOLDER }} /windows/${{ env.BUILD_TYPE }}/template.rc", "r+", encoding="utf8") as file:
504
509
data = file.read()
505
510
data = data\
506
511
.replace("@Version", version_string)\
@@ -512,11 +517,11 @@ jobs:
512
517
id : build-packages
513
518
uses : love-actions/love-actions-windows@v1
514
519
with :
515
- icon-path : ./.github/build /windows/${{ env.BUILD_TYPE }}/icon.ico
516
- rc-path : ./.github/build /windows/${{ env.BUILD_TYPE }}/template.rc
520
+ icon-path : ${{ env.BUILD_ASSETS_FOLDER }} /windows/${{ env.BUILD_TYPE }}/icon.ico
521
+ rc-path : ${{ env.BUILD_ASSETS_FOLDER }} /windows/${{ env.BUILD_TYPE }}/template.rc
517
522
love-package : ${{ env.CORE_LOVE_PACKAGE_PATH }}
518
- extra-assets-x86 : ./ColdClear/ x86/CCloader.dll ./ColdClear/ x86/cold_clear.dll ./.github/build /extraLibs/Windows_x64/discord-rpc.dll
519
- extra-assets-x64 : ./ColdClear/ x64/CCloader.dll ./ColdClear/ x64/cold_clear.dll ./.github/build /extraLibs/Windows_x86/discord-rpc.dll
523
+ extra-assets-x86 : ${{ env.COLD_CLEAR_FOLDER }}/ x86/CCloader.dll ${{ env.COLD_CLEAR_FOLDER }}/ x86/cold_clear.dll ${{ env.BUILD_ASSETS_FOLDER }} /extraLibs/Windows_x64/discord-rpc.dll
524
+ extra-assets-x64 : ${{ env.COLD_CLEAR_FOLDER }}/ x64/CCloader.dll ${{ env.COLD_CLEAR_FOLDER }}/ x64/cold_clear.dll ${{ env.BUILD_ASSETS_FOLDER }} /extraLibs/Windows_x86/discord-rpc.dll
520
525
product-name : ${{ steps.process-app-name.outputs.product-name }}
521
526
app-id : ${{ secrets.WINDOWS_APP_ID }}
522
527
project-website : https://www.studio26f.org/
@@ -569,7 +574,7 @@ jobs:
569
574
build-android,
570
575
build-linux,
571
576
build-macos-portable,
572
- build-web,
577
+ build-web-compat ,
573
578
build-windows,
574
579
]
575
580
env :
0 commit comments