scripts: gha: build tarball for dedicated server

This commit is contained in:
Alibek Omarov 2022-08-25 19:34:18 +03:00
parent a7d4cafe10
commit 9d49985100
1 changed files with 16 additions and 3 deletions

View File

@ -6,6 +6,10 @@ APP=xash3d-fwgs
APPDIR=$APP.AppDir
APPIMAGE=$APP-$ARCH.AppImage
DS=xashds-linux
DSDIR=$DS-$ARCH
DSTARGZ=$DS-$ARCH.tar.gz
build_sdl2()
{
cd "$BUILDDIR"/SDL2_src || die
@ -103,14 +107,23 @@ EOF
./appimagetool.AppImage "$APPDIR" "$APPIMAGE"
}
build_dedicated_tarball()
{
cd "$BUILDDIR" || die
./waf install --destdir=$DSDIR || die
tar -czvf $DSTARGZ $DSDIR
}
mkdir -p artifacts/
rm -rf build # clean-up build directory
build_engine dedicated
mv build/engine/xash artifacts/xashds-linux-$ARCH
build_dedicated_tarball
mv $DSTARGZ artifacts/
rm -rf build
build_sdl2
build_engine full
build_engine full # don't rebuild some common parts twice
build_appimage
mv $APPIMAGE artifacts/