forked from MBII/TextAssets
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (49 loc) · 2.37 KB
/
main.yml
File metadata and controls
54 lines (49 loc) · 2.37 KB
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
name: Package Assets
on:
workflow_dispatch:
push:
branches: [ master, vNext, buildTest-* ]
jobs:
package:
name: Package & Upload
runs-on: [self-hosted, windows]
steps:
- uses: actions/checkout@v2
- name: Package Files
shell: powershell
run: |
$GAMEDATA = "C:\Program Files (x86)\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData"
$MBII = $GAMEDATA + "\MBIITest"
svn cleanup --vacuum-pristines $GAMEDATA
svn update $MBII
$LegendsPk3 = $MBII + "\z_MBLegends.pk3"
$LegendsZip = $MBII + "\z_MBLegends.zip"
deterministic_zip MBAssets3.pk3 MBAssets3/
deterministic_zip 03_MovieGameMappack.pk3 03_MovieGameMappack/
deterministic_zip mb2_cmp_assets3.pk3 mb2_cmp_assets3/
deterministic_zip mb2_um_assets3.pk3 mb2_um_assets3/
deterministic_zip mb2_pb_assets2.pk3 mb2_pb_assets2/
mkdir .\temp\
Rename-Item -Path $LegendsPk3 -NewName $LegendsZip
Expand-Archive -Path ($MBII + "\z_MBLegends.zip") -DestinationPath .\temp\
Rename-Item -Path $LegendsZip -NewName $LegendsPk3
robocopy .\z_MBLegends\ext_data .\temp\ext_data /MIR /R:0 /W:0
deterministic_zip z_MBLegends.pk3 temp/
Remove-Item -Recurse -Force .\temp\
- name: Upload Files
shell: powershell
run: |
$GAMEDATA = "C:\Program Files (x86)\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData"
$MBII = $GAMEDATA + "\MBIITest"
svn cleanup --vacuum-pristines $GAMEDATA
svn update $MBII
Move-Item -Force -Path MBAssets3.pk3 -Destination $MBII\MBAssets3.pk3
Move-Item -Force -Path 03_MovieGameMappack.pk3 -Destination $MBII\03_MovieGameMappack.pk3
Move-Item -Force -Path mb2_cmp_assets3.pk3 -Destination $MBII\mb2_cmp_assets3.pk3
Move-Item -Force -Path mb2_um_assets3.pk3 -Destination $MBII\mb2_um_assets3.pk3
Move-Item -Force -Path mb2_pb_assets2.pk3 -Destination $MBII\mb2_pb_assets2.pk3
Move-Item -Force -Path z_MBLegends.pk3 -Destination $MBII\z_MBLegends.pk3
$BRANCH = "${{github.ref}}".Split("/")[2]
$HASH = "${{github.sha}}".Substring(0, 7)
svn commit -m "Text Assets based on : $BRANCH/$HASH" $MBII
svn update $MBII | out-file $MBII/svn_log.txt -encoding ASCII