-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (93 loc) · 3.49 KB
/
tf2.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: TF2 GSD
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * * # Every day @ midnight
jobs:
gsd:
name: GSD
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout artifacts
uses: actions/checkout@v3
with:
ref: "artifacts-tf2"
path: "artifacts"
- name: Install dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils cpio distro-info python3 util-linux ca-certificates binutils bc jq tmux netcat lib32gcc-s1 lib32stdc++6 libsdl2-2.0-0:i386 libcurl4-gnutls-dev:i386 -y
echo steam steam/question select "I AGREE" | sudo debconf-set-selections
echo steam steam/license note '' | sudo debconf-set-selections
sudo apt install steamcmd -y
- name: Install LGSM
run: wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh tf2server
- name: Install GS
run: yes | ./tf2server install
- name: Install Metamod
run: echo metamodsource | ./tf2server mods-install
- name: Install Sourcemod
run: echo sourcemod | ./tf2server mods-install
- name: Start server
run: ./tf2server start
- name: Wait for server
run: |
while ! nc -z localhost 27015; do
sleep 1
done
- name: Dump class list
run: ./tf2server send "sm_dump_classes classes"
- name: Dump netprops
run: |
./tf2server send "sm_dump_netprops netprops"
./tf2server send "sm_dump_netprops_xml netprops_xml"
- name: Dump datamaps
run: |
./tf2server send "sm_dump_datamaps datamaps"
./tf2server send "sm_dump_datamaps_xml datamaps_xml"
- name: Aggregate artifacts
run: |
cp serverfiles/bin/engine_srv.so artifacts/engine_srv.so
cp serverfiles/bin/steamclient.so artifacts/steamclient.so
cp serverfiles/tf/bin/server_srv.so artifacts/server_srv.so
cp serverfiles/tf/classes artifacts/classes
cp serverfiles/tf/netprops artifacts/netprops
cp serverfiles/tf/netprops_xml artifacts/netprops_xml
cp serverfiles/tf/datamaps artifacts/datamaps
cp serverfiles/tf/datamaps_xml artifacts/datamaps_xml
cp serverfiles/tf/scripts/items/items_game.txt artifacts/items_game.txt
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: tf2-binaries
path: |
artifacts/engine_srv.so
artifacts/steamclient.so
artifacts/server_srv.so
- name: Upload dumps
uses: actions/upload-artifact@v3
with:
name: tf2-dumps
path: |
artifacts/classes
artifacts/netprops
artifacts/netprops_xml
artifacts/datamaps
artifacts/datamaps_xml
- name: Upload item script
uses: actions/upload-artifact@v3
with:
name: tf2-item-script
path: artifacts/items_game.txt
- name: Commit changes
working-directory: artifacts
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name 'rumblefrog'
git config --global user.email '[email protected]'
git add -A
git commit -m 'chore: artifact upload'
git push
fi