-
Notifications
You must be signed in to change notification settings - Fork 17
626 lines (563 loc) · 26.1 KB
/
Build-Html-Package.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
name: Build ModLoader
run-name: Build ModLoader ${{ inputs.version }}
on:
push:
branches:
- "master"
- "*test*"
pull_request:
branches:
- "master"
workflow_dispatch:
inputs:
version:
description: "手动设定版本"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
os: [ windows-latest ]
#os: [ ubuntu-latest, windows-latest ]
node-version: [ 18.x ]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: corepack enable
run: corepack enable
- uses: actions/checkout@v4
with:
submodules: true
- name: SugarCube-2
uses: actions/checkout@v4
with:
repository: Lyoko-Jeremie/sugarcube-2_Vrelnir
path: SC2
ref: TS
#submodules: recursive
- name: init ModLoader
working-directory: ${{ github.workspace }}/ModLoader
run: git submodule update --init --recursive
# - name: ModLoader
# uses: actions/checkout@v4
# with:
# repository: Lyoko-Jeremie/sugarcube-2-ModLoader
# path: ModLoader
# ref: master
# submodules: recursive
# - name: DoL
# uses: actions/checkout@v4
# with:
# repository: Vrelnir/degrees-of-lewdity.git
# path: DoL
# ref: master
# github-server-url: 'https://gitgud.io'
# submodules: recursive
# /ModLoader Init =========================================
- name: Build ModLoader
working-directory: ${{ github.workspace }}/ModLoader
run: |
yarn install
yarn run ts:BeforeSC2
yarn run webpack:BeforeSC2
yarn run webpack:BeforeSC2-comp
yarn run ts:ForSC2
yarn run webpack:insertTools
yarn run tras:babel
- name: Build ModLoaderGui
working-directory: ${{ github.workspace }}/ModLoader/mod/ModLoaderGui
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy ModLoaderGui
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/ModLoaderGui/ModLoaderGui.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build ImageLoaderHook
working-directory: ${{ github.workspace }}/ModLoader/mod/ImageLoaderHook
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy ImageLoaderHook
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/ImageLoaderHook/ModLoader DoL ImageLoaderHook.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build CheckGameVersion
working-directory: ${{ github.workspace }}/ModLoader/mod/CheckGameVersion
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy CheckGameVersion
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/CheckGameVersion/CheckGameVersion.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build Diff3WayMerge
working-directory: ${{ github.workspace }}/ModLoader/mod/Diff3WayMerge
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy Diff3WayMerge
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/Diff3WayMerge/Diff3WayMerge.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build DoLTimeWrapperAddon
working-directory: ${{ github.workspace }}/ModLoader/mod/DoLTimeWrapperAddon
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy DoLTimeWrapperAddon
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/DoLTimeWrapperAddon/DoLTimeWrapperAddon.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build ModdedClothesAddon
working-directory: ${{ github.workspace }}/ModLoader/mod/ModdedClothesAddon
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy ModdedClothesAddon
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/ModdedClothesAddon/ModdedClothesAddon.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build ModdedFeatsAddon
working-directory: ${{ github.workspace }}/ModLoader/mod/ModdedFeatsAddon
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy ModdedFeatsAddon
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/ModdedFeatsAddon/ModdedFeatsAddon.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build ModdedHairAddon
working-directory: ${{ github.workspace }}/ModLoader/mod/ModdedHairAddon
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy ModdedHairAddon
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/ModdedHairAddon/ModdedHairAddon.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build ConflictChecker
working-directory: ${{ github.workspace }}/ModLoader/mod/ConflictChecker
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy ConflictChecker
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/ConflictChecker/ConflictChecker.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build SweetAlert2Mod
working-directory: ${{ github.workspace }}/ModLoader/mod/SweetAlert2Mod
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy SweetAlert2Mod
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/SweetAlert2Mod/SweetAlert2Mod.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build I18nTweeList
working-directory: ${{ github.workspace }}/ModLoader/mod/I18nTweeList
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy I18nTweeList
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/I18nTweeList/I18nTweeList.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build I18nScriptList
working-directory: ${{ github.workspace }}/ModLoader/mod/I18nScriptList
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy I18nScriptList
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/I18nScriptList/I18nScriptList.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build ReplacePatch
working-directory: ${{ github.workspace }}/ModLoader/mod/ReplacePatch
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy ReplacePatch
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/ReplacePatch/ReplacePatcher.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build TweePrefixPostfixAddon
working-directory: ${{ github.workspace }}/ModLoader/mod/TweePrefixPostfixAddon
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy TweePrefixPostfixAddon
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/TweePrefixPostfixAddon/TweePrefixPostfixAddon.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
# TweeReplacerLinker must build before `TweeReplacer` and `I18nTweeReplacer`
- name: Build TweeReplacerLinker
working-directory: ${{ github.workspace }}/ModLoader/mod/TweeReplacerLinker
run: |
yarn install
yarn run ts:type
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy TweeReplacerLinker
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/TweeReplacerLinker/TweeReplacerLinker.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build TweeReplacer
working-directory: ${{ github.workspace }}/ModLoader/mod/TweeReplacer
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy TweeReplacer
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/TweeReplacer/TweeReplacer.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build I18nTweeReplacer
working-directory: ${{ github.workspace }}/ModLoader/mod/I18nTweeReplacer
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy I18nTweeReplacer
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/I18nTweeReplacer/I18nTweeReplacer.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build CheckDoLCompressorDictionaries
working-directory: ${{ github.workspace }}/ModLoader/mod/CheckDoLCompressorDictionaries
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy CheckDoLCompressorDictionaries
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/CheckDoLCompressorDictionaries/CheckDoLCompressorDictionaries.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build ModuleCssReplacer
working-directory: ${{ github.workspace }}/ModLoader/mod/ModuleCssReplacer
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy ModuleCssReplacer
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/ModuleCssReplacer/ModuleCssReplacer.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build BeautySelectorAddon
working-directory: ${{ github.workspace }}/ModLoader/mod/BeautySelectorAddon
run: |
yarn install
yarn run build:ts
yarn run build:webpack
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy BeautySelectorAddon
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/BeautySelectorAddon/BeautySelectorAddon.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
- name: Build DoLHookWidget
working-directory: ${{ github.workspace }}/ModLoader/mod/DoLHookWidget
run: |
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: Copy DoLHookWidget
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/
source: ${{ github.workspace }}/ModLoader/mod/DoLHookWidget/DoLHookWidget.mod.zip
destBase: ${{ github.workspace }}/ModLoader/out
target: ${{ github.workspace }}/ModLoader/out
# ========= make GameOriginalImagePack =========
- name: Checkout GameOriginalImagePack
uses: actions/checkout@v4
with:
repository: Lyoko-Jeremie/GameOriginalImagePackMod
path: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack
ref: master
#submodules: recursive
- name: Build GameOriginalImagePack
if: runner.os == 'Windows'
working-directory: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack
run: |
yarn install
yarn run build:ts
yarn run build:webpack
yarn run build:tools
# copy game img , change boot.json GameVersion
- name: Copy img (Win)
if: runner.os == 'Windows'
working-directory: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack
run: copy -Path "${{ github.workspace }}/DoL/img" -Destination "${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack" -Recurse -Force
- name: ReadGameVersion
id: ReadGameVersion
working-directory: ${{ github.workspace }}
run: |
node "${{ github.workspace }}/readGameVersion.js" "${{ github.workspace }}/DOL/game/01-config/sugarcubeConfig.js"
# now we get the ${{ steps.ReadGameVersion.outputs.GameVersionString }}
- name: Make GameOriginalImagePack
if: runner.os == 'Windows'
working-directory: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack
run: |
node "${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack/dist-tools/bootJsonFillTool.js" "bootTemplate.json" "img" "${{ steps.ReadGameVersion.outputs.GameVersionString }}"
node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json"
- name: MKDIR
run: |
mkdir ${{ github.workspace }}/out-GameOriginalImagePack
- name: Copy GameOriginalImagePack
if: runner.os == 'Windows'
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack/
source: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack/GameOriginalImagePack.mod.zip
destBase: ${{ github.workspace }}/out-GameOriginalImagePack
target: ${{ github.workspace }}/out-GameOriginalImagePack
# ========= make GameOriginalImagePack ok =========
- name: Copy dist-BeforeSC2
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
source: ${{ github.workspace }}/ModLoader/dist-BeforeSC2/**/*
target: ${{ github.workspace }}/ModLoader/out/dist-BeforeSC2/
- name: Copy dist-BeforeSC2-comp
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
source: ${{ github.workspace }}/ModLoader/dist-BeforeSC2-comp/**/*
target: ${{ github.workspace }}/ModLoader/out/dist-BeforeSC2-comp/
- name: Copy dist-BeforeSC2-comp-babel
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
source: ${{ github.workspace }}/ModLoader/dist-BeforeSC2-comp-babel/**/*
target: ${{ github.workspace }}/ModLoader/out/dist-BeforeSC2-comp-babel/
- name: Copy dist-ForSC2
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
source: ${{ github.workspace }}/ModLoader/dist-ForSC2/**/*
target: ${{ github.workspace }}/ModLoader/out/dist-ForSC2/
- name: Copy dist-insertTools
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
source: ${{ github.workspace }}/ModLoader/dist-insertTools/**/*
target: ${{ github.workspace }}/ModLoader/out/dist-insertTools/
- name: Copy README.md
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
source: ${{ github.workspace }}/ModLoader/README.md
target: ${{ github.workspace }}/ModLoader/out
# /ModLoader OK =========================================
# /SC2 Init =========================================
- name: Build SC2
working-directory: ${{ github.workspace }}/SC2
run: |
npm install
node build.js -d -u -b 2
# /SC2 OK =========================================
- name: Copy SC2 format.js
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
one: "true"
srcBase: ${{ github.workspace }}/SC2/build/twine2/sugarcube-2/
source: ${{ github.workspace }}/SC2/build/twine2/sugarcube-2/format.js
destBase: ${{ github.workspace }}/DoL/devTools/tweego/storyFormats/sugarcube-2/
target: ${{ github.workspace }}/DoL/devTools/tweego/storyFormats/sugarcube-2/
# /DoL Init =========================================
- name: Build DoL (Linux)
if: runner.os != 'Windows'
working-directory: ${{ github.workspace }}/DoL
run: ./compile.sh
- name: Build DoL (Win)
if: runner.os == 'Windows'
working-directory: ${{ github.workspace }}/DoL
run: ./compile.bat
# /DoL OK =========================================
# - name: Upload debug
# uses: actions/upload-artifact@v3
# with:
# name: Html debug-${{ github.sha }}
# path: |
# ${{ github.workspace }}/DoL/devTools/tweego/storyFormats/sugarcube-2/format.js
# ${{ github.workspace }}/ModLoader/out/
- name: Inject ModLoader
working-directory: ${{ github.workspace }}/ModLoader/out
run: |
node "${{ github.workspace }}/ModLoader/out/dist-insertTools/insert2html.js" "${{ github.workspace }}/DoL/Degrees of Lewdity VERSION.html" "modList.json" "${{ github.workspace }}/ModLoader/out/dist-BeforeSC2/BeforeSC2.js"
- name: Inject ModLoader-compatibility
working-directory: ${{ github.workspace }}/ModLoader/out
run: |
node "${{ github.workspace }}/ModLoader/out/dist-insertTools/insert2html-polyfill.js" "${{ github.workspace }}/DoL/Degrees of Lewdity VERSION.html" "modList.json" "${{ github.workspace }}/ModLoader/out/dist-BeforeSC2-comp/BeforeSC2.js" "${{ github.workspace }}/ModLoader/out/dist-BeforeSC2-comp/polyfillWebpack.js"
# make package Init =========================================
- name: MKDIR
run: |
mkdir ${{ github.workspace }}/output
- name: Copy html
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/DoL/
source: ${{ github.workspace }}/DoL/Degrees of Lewdity VERSION.html.mod.html
target: ${{ github.workspace }}/output
- name: Copy html-compatibility
uses: Lyoko-Jeremie/js-copy-github-action@master
with:
srcBase: ${{ github.workspace }}/DoL/
source: ${{ github.workspace }}/DoL/Degrees of Lewdity VERSION.html.mod-polyfill.html
target: ${{ github.workspace }}/output
# - name: Copy style
# uses: Lyoko-Jeremie/js-copy-github-action@master
# with:
# srcBase: ${{ github.workspace }}/DoL/
# source: ${{ github.workspace }}/DoL/style.css
# target: ${{ github.workspace }}/output
# - name: Copy img
# uses: Lyoko-Jeremie/js-copy-github-action@master
# with:
# srcBase: ${{ github.workspace }}/DoL/
# source: ${{ github.workspace }}/DoL/img/**/*
# target: ${{ github.workspace }}/output
- name: Copy img (Win)
if: runner.os == 'Windows'
run: copy -Path "${{ github.workspace }}/DoL/img" -Destination "${{ github.workspace }}/output" -Recurse
- name: Archive Release (Artifact)
uses: thedoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: DoL-ModLoader-${{ github.sha }}.zip
directory: ${{ github.workspace }}/output
# make package OK =========================================
- name: Upload GameOriginalImagePack.mod.zip
uses: actions/upload-artifact@v3
with:
name: GameOriginalImagePack-mod-${{ github.sha }}
path: ${{ github.workspace }}/out-GameOriginalImagePack/GameOriginalImagePack.mod.zip
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Html Package-${{ github.sha }}
path: ${{ github.workspace }}/output/DoL-ModLoader-${{ github.sha }}.zip
- name: Get Current Time
id: time
uses: nanzm/get-time-action@master
with:
timeZone: UTC+8
format: 'YYYY-MM-DD-HH-mm-ss'
- name: Rename Archive (Manually)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
mv "output/DoL-ModLoader-${{ github.sha }}.zip" "output/DoL-ModLoader-${{ github.event.inputs.version }}-${{ github.sha }}.zip"
- name: Archive Release (Releases Manually)
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
files: |
output/DoL-ModLoader-${{ github.event.inputs.version }}-${{ github.sha }}.zip
out-GameOriginalImagePack/GameOriginalImagePack.mod.zip
name: Release v${{ github.event.inputs.version }}
tag_name: v${{ github.event.inputs.version }}-${{ github.sha }}
body: Release v${{ github.event.inputs.version }}-${{ github.sha }}
- name: Archive Release (Releases Auto)
uses: softprops/action-gh-release@v1
if: ${{ github.event_name != 'workflow_dispatch' }}
with:
files: |
output/DoL-ModLoader-${{ github.sha }}.zip
out-GameOriginalImagePack/GameOriginalImagePack.mod.zip
name: Auto Release on ${{ steps.time.outputs.time }} (${{ github.sha }})
tag_name: auto-${{ github.sha }}-${{ steps.time.outputs.time }}
body: Auto Release on ${{ steps.time.outputs.time }} (${{ github.sha }})
prerelease: true