File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 2626 else
2727 exit 1
2828 fi
29+ build-objects :
30+ name : Build objects
31+ runs-on : ubuntu-latest
32+ steps :
33+ - name : Checkout
34+ uses : actions/checkout@v3
35+ - name : Create objects.zip
36+ run : ./package
37+ - name : Upload artifacts
38+ uses : actions/upload-artifact@v2
39+ with :
40+ name : " OpenRCT2 Objects"
41+ path : artifacts/objects.zip
42+ - name : Create release
43+ uses : softprops/action-gh-release@v1
44+ if : startsWith(github.ref, 'refs/tags/v')
45+ with :
46+ fail_on_unmatched_files : true
47+ files : artifacts/objects.zip
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ outDir=" artifacts/objects"
5+
6+ echo -e " \033[0;36mRe-creating artifacts directory...\033[0m"
7+ rm -rf " artifacts"
8+ mkdir -p " $outDir "
9+
10+ echo -e " \033[0;36mCopying objects...\033[0m"
11+ pushd objects > /dev/null
12+ cp -r " official" " rct1" " rct2" " rct2ww" " rct2tt" " ../$outDir "
13+ popd > /dev/null
14+
15+ echo -e " \033[0;36mCreating .parkobj files...\033[0m"
16+ for i in $( find " $outDir " -type d) ;
17+ do
18+ objectFile=" $i /object.json"
19+ if [ -f " $objectFile " ]; then
20+ objName=$( basename " $i " )
21+ src=$i
22+ dst=" $src .parkobj"
23+ echo " $objName .parkobj"
24+ pushd " $src " > /dev/null
25+ zip -qr9 " ../$objName .parkobj" *
26+ popd > /dev/null
27+ rm -rf " $src "
28+ fi
29+ done ;
30+
31+ echo -e " \033[0;36mCreating final archive...\033[0m"
32+ pushd " $outDir " > /dev/null
33+ zip -qr9 " ../objects.zip" *
34+ popd > /dev/null
35+ rm -rf " $outDir "
You can’t perform that action at this time.
0 commit comments