-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (72 loc) · 2.18 KB
/
plugin.yml
File metadata and controls
83 lines (72 loc) · 2.18 KB
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
76
77
78
79
80
81
82
83
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
game:
- { dir: bms }
- { dir: hl2mp }
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Checkout smartdm
uses: actions/checkout@v6
with:
repository: Alienmario/smartdm-redux
path: deps/smartdm
- name: Checkout smlib
uses: actions/checkout@v6
with:
repository: bcserv/smlib
ref: transitional_syntax
path: deps/smlib
- name: Checkout StudioHdr
uses: actions/checkout@v6
with:
repository: Alienmario/StudioHdr
path: deps/StudioHdr
- name: Merge deps
run: |
cp -R deps/smartdm/* .
cp -R deps/smlib/scripting/include/* scripting/include
cp -R deps/StudioHdr/* .
- name: Setup sourcemod compiler
id: setup-sp
uses: rumblefrog/setup-sp@master
with:
version: '1.12.x'
version-file: ./scripting/ultimate_modelchooser.sp
define-name: PLUGIN_VERSION
- name: Compile plugins
run: |
mkdir -p plugins
for file in scripting/*.sp
do
plugin="$(basename "${file%.*}")"
echo -e "\nCompiling $plugin\n"
spcomp -v2 -i scripting/include -o plugins/"$plugin".smx "$file"
done
- name: Create package
run: |
rm plugins/modelchooser_api_example.smx
OUT="/tmp/build"
SM="${OUT}/addons/sourcemod"
mkdir -p $SM/configs
cp -R game/. $OUT
cp -R plugins $SM
cp -R scripting $SM
cp -R gamedata $SM
cp -R configs-${{ matrix.game.dir }}/. $SM/configs
if [ -d "data" ]
then
cp -R data $SM
fi
- name: Upload package
uses: actions/upload-artifact@v7
with:
name: modelchooser-${{ matrix.game.dir }}-v${{ steps.setup-sp.outputs.plugin-version }}.${{ github.run_number }}
path: /tmp/build/