chore: update release workflow #60
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: LLHL - New version release | |
on: | |
push: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
container: centos:centos7 | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
- name: Setting up CentOS 7 mirrorlist | |
run: | | |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* | |
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* | |
- name: Installing required packages | |
run: | | |
yum install -y git make wget tar zip gcc gcc-c++ glibc-devel.i686 libstdc++-devel.i686 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 12 | |
- name: Clone LLHL AGMOD repository | |
run: | | |
git clone https://github.com/7mochi/llhl-agmod | |
- name: Clone LLHL repository | |
run: | | |
git clone https://github.com/7mochi/llhl | |
cd llhl && git checkout full-release-ci | |
- name: Clone LLHL Resources repository | |
run: | | |
git clone https://github.com/7mochi/llhl-resources | |
- name: Build LLHL AGMOD serverfile .so | |
run: | | |
cd llhl-agmod | |
CPATH=$CPATH:/usr/include/c++/4.8.5/i686-redhat-linux CFG=$CONFIGURATION make -C dlls | |
- name: Build LLHL proyect (Linux) with node-amxxpack | |
run: | | |
cd llhl && make init-linux && make build-linux | |
- name: Download latest AMX Mod X 1.9 | |
run: | | |
wget "https://www.amxmodx.org/latest.php?version=1.9&os=linux&package=base" -O amxx.tar.gz | |
tar -xzf amxx.tar.gz -C llhl/dist/ag | |
- name: Create folder and move LLHL AGMOD .so | |
run: | | |
mkdir -p llhl/dist/ag/dlls | |
mv llhl-agmod/dlls/ag_i386.so llhl/dist/ag/dlls/ag.so | |
mv llhl-agmod/network/delta.lst llhl/dist/ag/delta.lst | |
- name: Create folder for full release | |
run: | | |
mkdir -p llhl/dist-full | |
cp llhl/dist llhl/dist-full | |
- name: Move LLHL resources to LLHL folder | |
run: | | |
mv llhl-resources/maps-ag-official/* llhl/dist-full/ag | |
mv llhl-resources/maps-ehll-unofficial/* llhl/dist-full/ag | |
mv llhl-resources/maps-valve-official/* llhl/dist-full/ag | |
- name: Prepare releases in zip | |
run: | | |
cd llhl/dist && zip -r ../llhl-${{github.ref_name}}-linux.zip * | |
- name: Upload artifact (Lite version) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: llhl-${{github.ref_name}}-linux-lite | |
path: llhl/dist | |
- name: Upload artifact (Full version) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: llhl-${{github.ref_name}}-linux-full | |
path: llhl/dist-full | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
- name: Install NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Clone LLHL AGMOD repository | |
run: | | |
git clone https://github.com/7mochi/llhl-agmod | |
- name: Clone LLHL repository | |
run: | | |
git clone https://github.com/7mochi/llhl | |
cd llhl && git checkout full-release-ci | |
- name: Clone LLHL Resources repository | |
run: | | |
git clone https://github.com/7mochi/llhl-resources | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Build LLHL AGMOD serverfile .dll | |
run: | | |
cd llhl-agmod | |
msbuild multiplayer.sln -target:ag /p:Configuration=Release | |
- name: Build LLHL proyect (Windows) with node-amxxpack | |
run: | | |
cd llhl && make init-windows && make build-windows | |
- name: Download latest AMX Mod X 1.9 | |
run: | | |
Invoke-WebRequest -Uri "https://www.amxmodx.org/latest.php?version=1.9&os=windows&package=base" -OutFile amxx.zip | |
Expand-Archive -Path amxx.zip -DestinationPath llhl/dist/ag | |
- name: Create folder and move LLHL AGMOD .dll | |
run: | | |
mkdir -p llhl/dist/ag/dlls | |
move llhl-agmod/dlls/msvc/Release/ag.dll llhl/dist/ag/dlls/ag.dll | |
move llhl-agmod/network/delta.lst llhl/dist/ag/delta.lst | |
- name: Create folder for full release | |
run: | | |
mkdir -p llhl/dist-full | |
copy llhl/dist llhl/dist-full | |
- name: Move LLHL resources to LLHL folder | |
run: | | |
move llhl-resources/maps-ag-official/* llhl/dist-full/ag | |
move llhl-resources/maps-ehll-unofficial/* llhl/dist-full/ag | |
move llhl-resources/maps-valve-official/* llhl/dist-full/ag | |
- name: Prepare releases in zip | |
run: | | |
cd llhl/dist && Compress-Archive -Path * -DestinationPath ../llhl-${{github.ref_name}}-windows.zip | |
- name: Upload artifact (Lite version) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: llhl-${{github.ref_name}}-windows-lite | |
path: llhl/dist | |
- name: Upload artifact (Full version) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: llhl-${{github.ref_name}}-windows-full | |
path: llhl/dist-full |