Skip to content

Merge pull request #138 from ampreeT/readme-update-0 #94

Merge pull request #138 from ampreeT/readme-update-0

Merge pull request #138 from ampreeT/readme-update-0 #94

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
game:
- { dir: bms, args: "SRCCOOP_BLACKMESA=1" }
- { dir: hl2mp, args: "SRCCOOP_HL2DM=1" }
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup sourcemod compiler
id: setup-sp
uses: rumblefrog/setup-sp@master
with:
version: '1.11.6960'
version-file: ./scripting/include/srccoop/public.inc
define-name: SRCCOOP_VERSION
- name: Compile plugins
run: |
mkdir -p plugins/disabled/srccoop_debug
for file in scripting/*.sp
do
plugin="$(basename "${file%.*}")"
echo -e "\nCompiling $plugin\n"
spcomp -v2 -i scripting/include -o plugins/"$plugin" "$file" NO_DEBUG=1 ${{ matrix.game.args }}
spcomp -v2 -i scripting/include -o plugins/disabled/srccoop_debug/"$plugin" "$file" ${{ matrix.game.args }}
done
- name: Create package
run: |
OUT="/tmp/srccoop"
SM="${OUT}/addons/sourcemod"
EDT_DEST="${SM}/data/srccoop"
mkdir -p $SM
mkdir -p $EDT_DEST
cp -R extensions $SM
cp -R plugins $SM
cp -R configs $SM
cp -R gamedata $SM
cp -R scripting $SM
cp -R translations $SM
cp -R data $SM
cp -R edt/common/. $EDT_DEST
if [ -d "edt/${{ matrix.game.dir }}" ]
then
cp -R edt/${{ matrix.game.dir }}/. $EDT_DEST
fi
cp -R gamecontent/common/. $OUT
if [ -d "gamecontent/${{ matrix.game.dir }}" ]
then
cp -R gamecontent/${{ matrix.game.dir }}/. $OUT
fi
: # prune any development files
find $OUT -type f -name ".gitignore" -delete
: # print package tree
tree -a $OUT
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: SourceCoop-${{ steps.setup-sp.outputs.plugin-version }}-${{ matrix.game.dir }}-build${{ github.run_number }}
path: /tmp/srccoop/