-
-
Notifications
You must be signed in to change notification settings - Fork 273
909 lines (870 loc) · 31.1 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
name: Daily Build
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
buildNumber:
description: 'Build Number'
required: true
default: '9999'
buildYear:
description: 'Build Year'
required: true
default: '2100'
onlyLatest:
description: "Only Latest Xcode"
type: 'boolean'
required: false
default: false
env:
WORKSPACE: ${{ github.workspace }}
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
BUILD_NUMBER: ${{ github.event.inputs.buildNumber }}
YEAR: ${{ github.event.inputs.buildYear }}
jobs:
source-code:
name: Check out and process source code
runs-on: macos-12
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- uses: actions/checkout@v4
with:
submodules: recursive
- run: ./tools/GHAction/daily_env.sh
- name: Set daily build
run: ./tools/GHAction/process_sources.sh
- name: Upload Source bundle
uses: actions/upload-artifact@v4
with:
name: SourceCode
path: ./output
native:
needs: source-code
runs-on: macos-14
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- name: Build Native
run: JAVA_HOME="$JAVA_HOME_11_X64" ./tools/GHAction/build_native.sh
env:
CERT_PASSWORD: ${{ secrets.CertPassword }}
- name: Upload Corona Native
uses: actions/upload-artifact@v4
with:
name: Native
path: ./output
Xcode-template-matrix-14:
strategy:
matrix:
runner:
- macos-14
xcode:
- Xcode_15.3
- Xcode_15.4
target:
- template
- template-angle
platform:
- iphone
- tvos
needs: source-code
runs-on: ${{ matrix.runner }}
env:
DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer
TEMPLATE_TARGET: ${{ matrix.target }}
TEMPLATE_PLATFORM: ${{ matrix.platform }}
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- name: Build templates
working-directory: ./platform/${{ matrix.platform }}
run: ./gh_build_templates.sh
env:
CERT_PASSWORD: ${{ secrets.CertPassword }}
- name: Build templates JSON spec
run: ./tools/GHAction/generate_xcode_jsons.py
- name: Upload templates
uses: actions/upload-artifact@v4
with:
name: Templates-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.target }}
path: ./output
Xcode-template-matrix-13:
if: (! github.event.inputs.onlyLatest)
strategy:
matrix:
runner:
- macos-13
xcode:
- Xcode_15.2
target:
- template
- template-angle
platform:
- iphone
- tvos
needs: source-code
runs-on: ${{ matrix.runner }}
env:
DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer
TEMPLATE_TARGET: ${{ matrix.target }}
TEMPLATE_PLATFORM: ${{ matrix.platform }}
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- name: Build templates
working-directory: ./platform/${{ matrix.platform }}
run: ./gh_build_templates.sh
env:
CERT_PASSWORD: ${{ secrets.CertPassword }}
- name: Build templates JSON spec
run: ./tools/GHAction/generate_xcode_jsons.py
- name: Upload templates
uses: actions/upload-artifact@v4
with:
name: Templates-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.target }}
path: ./output
Xcode-template-matrix-12:
if: (! github.event.inputs.onlyLatest)
strategy:
matrix:
runner:
- macos-12
xcode:
- Xcode_13.2.1
- Xcode_14.2
target:
- template
- template-angle
platform:
- iphone
- tvos
needs: source-code
runs-on: ${{ matrix.runner }}
env:
DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer
TEMPLATE_TARGET: ${{ matrix.target }}
TEMPLATE_PLATFORM: ${{ matrix.platform }}
S2D_MIN_VER_IOS: "8.0"
S2D_MIN_VER_TVOS: "9.0"
S2D_MIN_VER_MACOS: "10.9"
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- name: Build templates
working-directory: ./platform/${{ matrix.platform }}
run: ./gh_build_templates.sh
env:
CERT_PASSWORD: ${{ secrets.CertPassword }}
- name: Build templates JSON spec
run: ./tools/GHAction/generate_xcode_jsons.py
- name: Upload templates
uses: actions/upload-artifact@v4
with:
name: Templates-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.target }}
path: ./output
collect-ios-templates:
needs:
- Xcode-template-matrix-12
- Xcode-template-matrix-13
- Xcode-template-matrix-14
runs-on: ubuntu-20.04
if: (! failure() && ! cancelled())
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Collect templates together
run: |
mkdir -p output/iostemplate
for D in Templates-*
do
mv -v "$D/"*.tar.bz output/iostemplate
done
- name: Generate template JSON
run: find Templates-* -name '*_*-SDKs.json' -exec ./tools/GHAction/aggregate_xcode_jsons.py output {} \+
- name: Upload templates
uses: actions/upload-artifact@v4
with:
name: Collected-ios-templates
path: ./output
webtemplate:
needs:
- source-code
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Set up emsdk
run: |
wget -q --header='Accept:application/octet-stream' https://github.com/coronalabs/emsdk/releases/download/e2.0.34/emsdk.tar.xz -O emsdk.tar.xz
tar -xjf emsdk.tar.xz -C ~/
xattr -r -d com.apple.quarantine ~/emsdk || true
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- name: Build webtemplate
working-directory: ./platform/emscripten/gmake
run: |
source ~/emsdk/emsdk_env.sh
./build_template.sh
- name: Copy result to output
run: |
mkdir -p output
cp -v platform/emscripten/webtemplate.zip output
- name: Upload webtemplate artifact
uses: actions/upload-artifact@v4
with:
name: Webtemplate
path: ./output
linux:
needs:
- source-code
- native
- webtemplate
runs-on: ubuntu-20.04
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get Webtemplate
uses: actions/download-artifact@v4
with:
name: Webtemplate
path: Webtemplate
- name: Get Native
uses: actions/download-artifact@v4
with:
name: Native
path: Native
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- run: mkdir docs
- name: Get Sample Code
uses: actions/checkout@v4
with:
repository: coronalabs/samples-coronasdk
path: docs/SampleCode
- name: Run build script
run: platform/linux/gh_action.sh
- name: Upload Linux-Template
uses: actions/upload-artifact@v4
with:
name: Linux-Template
path: ./output/linuxtemplate_x64.tgz
- name: Upload snap
uses: actions/upload-artifact@v4
with:
name: Snap
path: ./output/*.snap
linux-flatpak:
needs:
- source-code
- native
- webtemplate
runs-on: ubuntu-20.04
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get Webtemplate
uses: actions/download-artifact@v4
with:
name: Webtemplate
path: Webtemplate
- name: Get Native
uses: actions/download-artifact@v4
with:
name: Native
path: Native
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- run: mkdir docs
- name: Get Sample Code
uses: actions/checkout@v4
with:
repository: coronalabs/samples-coronasdk
path: docs/SampleCode
- name: Run build script
run: platform/linux/gh_action_flatpak.sh
continue-on-error: true
- run: touch solar2d.flatpak
- name: Upload flatpak
uses: actions/upload-artifact@v4
with:
name: Flatpak
path: ./solar2d.flatpak
CoronaCards-Android:
needs: native
runs-on: ubuntu-20.04
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- uses: actions/checkout@v4
- name: Get Native
uses: actions/download-artifact@v4
with:
name: Native
path: Native
- name: Put native in place
run: |
tar -xvzf Native/CoronaNative.tar.gz CoronaEnterprise/Corona/android/lib/gradle/Corona.aar
mv CoronaEnterprise/Corona/android/lib/gradle/Corona.aar ./CoronaCards.aar
cp platform/android/sdk/AndroidManifest-Cards.xml ./AndroidManifest.xml
zip -o CoronaCards.aar AndroidManifest.xml
zip -o CoronaCardsAndroidAAR.zip CoronaCards.aar
mkdir -p output
mv CoronaCardsAndroidAAR.zip output/
- name: Upload Corona Cards Android AAR archive
uses: actions/upload-artifact@v4
with:
name: CoronaCards-Android
path: ./output
CoronaCards-iOS:
needs: source-code
runs-on: macos-14
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- name: Corona Cards framework for iOS
working-directory: ./platform/iphone
run: |
xcodebuild -scheme CoronaCards.framework -project ratatouille.xcodeproj -configuration Release -sdk iphoneos build -derivedDataPath "$(pwd)/build"
cd build/Build/Products/Release-iphoneos
mkdir "${WORKSPACE}/output"
zip -r -y -o "${WORKSPACE}/output"/CoronaCards.framework.zip CoronaCards.framework
- name: Upload CoronaCards framework archive
uses: actions/upload-artifact@v4
with:
name: CoronaCards-iOS
path: ./output
CoronaCards-iOS-angle:
needs: source-code
runs-on: macos-14
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- name: Corona Cards framework for iOS
working-directory: ./platform/iphone
run: |
xcodebuild -scheme CoronaCards-angle.framework -project ratatouille.xcodeproj -configuration Release -sdk iphoneos build -derivedDataPath "$(pwd)/build"
cd build/Build/Products/Release-iphoneos
rm -rf CoronaCards.framework
cp -R CoronaCards-angle.framework/CoronaCards-angle CoronaCards-angle.framework/CoronaCards
ln -s CoronaCards-angle.framework CoronaCards.framework
mkdir "${WORKSPACE}/output"
zip -r -y -o "${WORKSPACE}/output"/CoronaCards-angle.zip CoronaCards-angle.framework CoronaCards.framework
- name: Upload CoronaCards framework archive
uses: actions/upload-artifact@v4
with:
name: CoronaCards-iOS-angle
path: ./output
macOS-Simulator:
needs:
- source-code
- collect-ios-templates
- native
- webtemplate
- linux
if: (! failure() && ! cancelled())
runs-on: macos-14
steps:
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: tar -xzf SourceCode/corona.tgz
- run: ./tools/GHAction/daily_env.sh
- name: Check for macOS min supported version
run: exit $( echo $(cat platform/mac/AppDelegate.mm | perl -ne 'print for /kosVersionCurrent = @"([0-9.]+)"/') ' < ' $(/usr/bin/xcrun --sdk macosx --show-sdk-version) | bc )
- name: Get collected templates
uses: actions/download-artifact@v4
with:
name: Collected-ios-templates
path: Collected-ios-templates
- name: Put collected iOS templates in place
run: cp -Rv Collected-ios-templates/* platform/resources/
- name: Get Webtemplate
uses: actions/download-artifact@v4
with:
name: Webtemplate
path: Webtemplate
- name: Put webtemplate in place
run: cp -v Webtemplate/webtemplate.zip platform/resources/
- name: Get Linux template
uses: actions/download-artifact@v4
with:
name: Linux-Template
path: Linux-Template
- name: Put webtemplate in place
run: |
cp -v Linux-Template/linuxtemplate_x64.tgz platform/resources/
- run: mkdir docs
- name: Get Sample Code
uses: actions/checkout@v4
with:
repository: coronalabs/samples-coronasdk
path: docs/SampleCode
- name: Clean-up docs
run: rm -rf docs/SampleCode/.git docs/SampleCode/.gitignore
- name: Get Native
uses: actions/download-artifact@v4
with:
name: Native
path: Native
- name: Put JRE in place
shell: bash
run: |
curl -sL https://github.com/coronalabs/binary-data/releases/download/1.0/jre.macos.tgz -o jre.macos.tgz
- name: required for appdmg
run: brew install python-setuptools
- name: install appdmg
run: npm install -g appdmg
- name: install imagemagick
run: brew install imagemagick gs || true
- name: freshen icu4c for node
run: brew upgrade icu4c || brew install icu4c
- name: Build DMG
run: ./tools/GHAction/build_dmg.sh
env:
CERT_PASSWORD: ${{ secrets.CertPassword }}
- name: Notarize
run: |
[ -n "$APPLE_ISSUER" ] || exit 0
APPLE_KEY_FILE="$(mktemp)"
echo "$APPLE_KEY" > "$APPLE_KEY_FILE"
xcrun notarytool submit --key "$APPLE_KEY_FILE" --issuer "$APPLE_ISSUER" --key-id "$APPLE_KEY_ID" --wait ./output/*.dmg
xcrun stapler staple ./output/*.dmg
shell: bash
env: # get this at https://appstoreconnect.apple.com/access/api
APPLE_KEY: ${{ secrets.AppleKey }} ## full contents of the file
APPLE_KEY_ID: ${{ secrets.AppleKeyId }}
APPLE_ISSUER: ${{ secrets.AppleIssuer }}
- name: Upload macOS Daily build artifact
uses: actions/upload-artifact@v4
with:
name: Simulator-macOS
path: ./output
check-notarization:
runs-on: macos-14
steps:
- name: Check notarization credentials
run: |
[ -n "$APPLE_ISSUER" ] || exit 0
T="R7NmWb1brmEx65"
echo "::add-mask::$T"
Z="cNgt1OO-"
echo "::add-mask::$Z"
APPLE_KEY_FILE="$(mktemp)"
echo "$APPLE_KEY" > "$APPLE_KEY_FILE"
if ! xcrun notarytool history --key "$APPLE_KEY_FILE" --issuer "$APPLE_ISSUER" --key-id "$APPLE_KEY_ID" &> /dev/null
then
curl -X POST -H "Content-Type: application/json" -d '{"value1":"'$GITHUB_REPOSITORY'"}' https://maker.ifttt.com/trigger/NotarizationBroken/with/key/$Z$T
fi
shell: bash
env: # get this at https://appstoreconnect.apple.com/access/api
APPLE_KEY: ${{ secrets.AppleKey }}
APPLE_KEY_ID: ${{ secrets.AppleKeyId }}
APPLE_ISSUER: ${{ secrets.AppleIssuer }}
Windows-Simulator:
needs:
- source-code
- native
- webtemplate
- linux
runs-on: windows-2019
steps:
- name: Get processed code
uses: actions/download-artifact@v4
with:
name: SourceCode
path: SourceCode
- name: Unpack source code
run: |
7z x SourceCode/corona.tgz
7z x corona.tar
- run: ./tools/GHAction/daily_env.sh
shell: bash
- run: mkdir -f docs
- name: Get Sample Code
uses: actions/checkout@v4
with:
repository: coronalabs/samples-coronasdk
path: docs/SampleCode
- name: Clean-up docs
run: rm -rf docs/SampleCode/.git docs/SampleCode/.gitignore
shell: bash
- name: Move docs outside the directory
run: mv docs ../docs
- name: Get Webtemplate
uses: actions/download-artifact@v4
with:
name: Webtemplate
path: Webtemplate
- name: Put webtemplate in place
run: cp -v Webtemplate/webtemplate.zip platform/resources/
shell: bash
- name: Get NX Template
shell: bash
run: |
curl -sL https://github.com/coronalabs/binary-data/releases/download/1.0/nxtemplate > platform/resources/nxtemplate
- name: Get Linux template
uses: actions/download-artifact@v4
with:
name: Linux-Template
path: Linux-Template
- name: Put webtemplate in place
run: |
cp -v Linux-Template/linuxtemplate_x64.tgz platform/resources/
shell: bash
- name: Get Corona Native
uses: actions/download-artifact@v4
with:
name: Native
path: Native
- name: Put native in place
shell: cmd
run: |
mkdir "%WORKSPACE%\platform\windows\Bin"
cd "%WORKSPACE%\platform\windows\Bin"
rmdir /s /q "Native"
tar -xvzf "%WORKSPACE%\Native\CoronaNative.tar.gz"
rm ._CoronaEnterprise
mv CoronaEnterprise Native
del /q /f Native\.*
del /q /f Native\Icon?
del /q /f /s Native\Corona\tvos\frameworks\CoronaCards.framework
- name: Put JRE in place
shell: bash
run: |
curl -sL https://github.com/coronalabs/binary-data/releases/download/1.0/jre.win32.7z -o jre.win32.7z
7z x jre.win32.7z -o"platform/windows/Bin" -y
- name: Put redistributables in place
shell: bash
run: |
curl -sL https://github.com/coronalabs/binary-data/releases/download/1.0/redist.win32.7z -o redist.win32.7z
7z x redist.win32.7z -o"platform/windows/Bin/redist" -y
- name: Build Corona Simulator
shell: cmd
run: |
cd platform\windows
call UpdateFileVersions.bat %BUILD_NUMBER%
call Build.Tools\VSVars.bat
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
devenv "Corona.SDK.sln" /rebuild "Release|x86"
env:
WIN_CERT_PASSWORD: ${{ secrets.WinCertPassword }}
- name: Copy Simulator
run: |
mkdir output
cp -v ./platform/windows/Bin/Corona.SDK.Installer/Corona.msi output/Corona-$BUILD.msi
shell: bash
- name: Upload Widnows Corona artifact
uses: actions/upload-artifact@v4
with:
name: Simulator-Windows
path: ./output
publish-snap:
runs-on: ubuntu-20.04
needs:
- linux
- release
steps:
- uses: actions/download-artifact@v4
with:
name: Snap
path: Snap
- name: Determine release
run: |
if ls Snap/*2100.9999* &> /dev/null
then
export SNAP_RELEASE=edge
else
export SNAP_RELEASE=stable
fi
echo "SNAP_RELEASE=$SNAP_RELEASE" >> $GITHUB_ENV
find Snap -name '*.snap' -execdir mv -v {} s2d.snap \; -quit
- uses: snapcore/action-publish@v1
continue-on-error: true
with:
store_login: ${{ secrets.SNAP_STORE_LOGIN }}
snap: ./Snap/s2d.snap
release: ${{ env.SNAP_RELEASE }}
release:
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-20.04
needs:
- Windows-Simulator
- macOS-Simulator
- linux
- CoronaCards-Android
- CoronaCards-iOS
- CoronaCards-iOS-angle
- native
steps:
- uses: actions/checkout@v4
- run: ./tools/GHAction/daily_env.sh
- name: Generate Change Log
run: |
git fetch --prune --unshallow
git fetch origin '+refs/tags/*:refs/tags/*'
GIT_LOG=$(git log --format='* %s (%h)' --branches=master --ancestry-path $(git describe --tags --abbrev=0 $GITHUB_REF^)..$(git describe --tags --abbrev=0 $GITHUB_REF)) || true
if [ -n "$GIT_LOG" ]
then
GIT_LOG="Changes since previous build:
$GIT_LOG
For linux it is recommended to use snap:
sudo snap install solar2d
"
else
GIT_LOG='See https://github.com/coronalabs/corona for details
'
fi
echo 'GIT_LOG<<EOF' >> $GITHUB_ENV
echo "$GIT_LOG" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo "$GIT_LOG"
- uses: actions/download-artifact@v4
with:
name: Simulator-macOS
path: Simulator-macOS
- uses: actions/download-artifact@v4
with:
name: Simulator-Windows
path: Simulator-Windows
- uses: actions/download-artifact@v4
with:
name: CoronaCards-iOS
path: CoronaCards-iOS
- uses: actions/download-artifact@v4
with:
name: CoronaCards-iOS-angle
path: CoronaCards-iOS-angle
- uses: actions/download-artifact@v4
with:
name: CoronaCards-Android
path: CoronaCards-Android
- uses: actions/download-artifact@v4
with:
name: Native
path: Native
- uses: actions/download-artifact@v4
with:
name: Flatpak
path: Flatpak
- uses: actions/download-artifact@v4
with:
name: Snap
path: Snap
- run: find Snap -name '*.snap' -execdir mv -v {} s2d.snap \; -quit
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Solar2D ${{ env.YEAR }}.${{ env.BUILD }}
body: ${{ env.GIT_LOG }}
- name: Upload Release Asset for macOS Simulator
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Simulator-macOS/Corona-${{ env.YEAR }}.${{ env.BUILD }}.dmg
asset_name: Solar2D-macOS-${{ env.YEAR }}.${{ env.BUILD }}.dmg
asset_content_type: application/x-apple-diskimage
- name: Upload Release Asset for Windows Simulator
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Simulator-Windows/Corona-${{ env.BUILD }}.msi
asset_name: Solar2D-Windows-${{ env.YEAR }}.${{ env.BUILD }}.msi
asset_content_type: application/x-msi
- name: Upload Release Asset for Linux Snap
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Snap/s2d.snap
asset_name: Solar2D-Linux-${{ env.YEAR }}.${{ env.BUILD }}_amd64.snap
asset_content_type: application/octet-stream
- name: Upload Release Asset Corona Cards iOS
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./CoronaCards-iOS/CoronaCards.framework.zip
asset_name: CoronaCards-iOS-${{ env.YEAR }}.${{ env.BUILD }}.zip
asset_content_type: application/zip
- name: Upload Release Asset Corona Cards iOS Angle
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./CoronaCards-iOS-angle/CoronaCards-angle.zip
asset_name: CoronaCards-iOS-MetalANGLE-${{ env.YEAR }}.${{ env.BUILD }}.zip
asset_content_type: application/zip
- name: Upload Release Asset Corona Cards Android
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./CoronaCards-Android/CoronaCardsAndroidAAR.zip
asset_name: CoronaCards-Android-${{ env.YEAR }}.${{ env.BUILD }}.zip
asset_content_type: application/zip
- name: Upload Release Asset Android Debug Symbols
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Native/AndroidDebugSymbols.zip
asset_name: AndroidDebugSymbols-${{ env.YEAR }}.${{ env.BUILD }}.zip
asset_content_type: application/zip
notify-chats:
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-20.04
needs:
- release
steps:
- run: echo "BUILD=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Notify slack Builds channel
run: |
[ -z "$SLACK_BOT_TOKEN" ] && exit 0
curl https://slack.com/api/chat.postMessage -X POST -H "Content-type: application/json" -H "Authorization: Bearer $SLACK_BOT_TOKEN" -d @- << EOF
{
"channel":"C01629K0E9W",
"link_names":true,
"text": "New Solar2D build <https://github.com/coronalabs/corona/releases/tag/${{ env.BUILD }}|${{ env.BUILD }}> is @here!"
}
EOF
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Notify slack General channel
run: |
[ -z "$SLACK_BOT_TOKEN" ] && exit 0
curl https://slack.com/api/chat.postMessage -X POST -H "Content-type: application/json" -H "Authorization: Bearer $SLACK_BOT_TOKEN" -d @- << EOF
{
"channel":"C0ASY7G1X",
"link_names":true,
"text": "New Solar2D Build <https://github.com/coronalabs/corona/releases/tag/${{ env.BUILD }}|${{ env.BUILD }}> is up!"
}
EOF
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Notify Disord Builds channel
run: |
[ -z "$DISCORD_WEBHOOK_BUILDS" ] && exit 0
curl "$DISCORD_WEBHOOK_BUILDS" -X POST -H "Content-type: application/json" -d @- << EOF
{
"content": "New Solar2D Build [${{ env.BUILD }}](https://github.com/coronalabs/corona/releases/tag/${{ env.BUILD }}) is up!"
}
EOF
env:
DISCORD_WEBHOOK_BUILDS: ${{ secrets.DISCORD_WEBHOOK_BUILDS }}
notify-group: # Sends an email to the https://groups.google.com/forum/#!forum/solar2d-builds
needs:
- Windows-Simulator
- macOS-Simulator
- linux
- CoronaCards-Android
- CoronaCards-iOS
- release
- source-code
runs-on: ubuntu-20.04
if: (success() || failure()) && !cancelled() && (!contains(github.ref, 'refs/tags/') || github.repository == 'coronalabs/corona')
steps:
- uses: technote-space/workflow-conclusion-action@v1
- uses: actions/checkout@v4
- run: ./tools/GHAction/daily_env.sh
- name: notify
run: |
git fetch --prune --unshallow
git fetch origin '+refs/tags/*:refs/tags/*'
T="R7NmWb1brmEx65"
echo "::add-mask::$T"
Z="cNgt1OO-"
echo "::add-mask::$Z"
TEXT="Run: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
if [[ "$GITHUB_REF" == refs/tags/* ]] && [[ "$WORKFLOW_CONCLUSION" == "success" ]]
then
TEXT="$TEXT
Release: https://github.com/${{github.repository}}/releases/tag/$BUILD_NUMBER"
GIT_LOG=$(git log --format='* %s (%h)' --ancestry-path $(git describe --tags --abbrev=0 $GITHUB_REF^)..$(git describe --tags --abbrev=0 $GITHUB_REF)) || true
if [ -n "$GIT_LOG" ]
then
TEXT="$TEXT
Git log since previous release:
$GIT_LOG
"
fi
fi
TEXT="${TEXT//$'\n'/<br>}"
curl -X POST -H "Content-Type: application/json" -d '{"value1":"'"$YEAR.$BUILD_NUMBER"' '"$WORKFLOW_CONCLUSION"'","value2":"'"$TEXT"'"}' https://maker.ifttt.com/trigger/Solar2DBuild/with/key/$Z$T