-
Notifications
You must be signed in to change notification settings - Fork 13
75 lines (68 loc) · 2.23 KB
/
plugin.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
pull_request:
push:
branches: master
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.12.7163'
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".smx "$file" NO_DEBUG=1 ${{ matrix.game.args }}
spcomp -v2 -i scripting/include -o plugins/disabled/srccoop_debug/"$plugin".smx "$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/