Skip to content

Commit 24f9dbc

Browse files
committed
updatess
1 parent dea4bfb commit 24f9dbc

2 files changed

Lines changed: 142 additions & 75 deletions

File tree

.github/workflows/build.yml

Lines changed: 141 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Metamod + CounterStrikeSharp + PoorSharpTimer
1+
name: Bundle Metamod + CounterStrikeSharp + PoorSharpTimer (Linux & Windows)
22

33
on:
44
workflow_dispatch:
@@ -9,22 +9,34 @@ permissions:
99
contents: write
1010

1111
env:
12+
# Linux sources
1213
METAMOD_URL_LINUX: https://mms.alliedmods.net/mmsdrop/2.0/mmsource-2.0.0-git1366-linux.tar.gz
1314
CSS_URL_LINUX: https://github.com/roflmuffin/CounterStrikeSharp/releases/download/v1.0.340/counterstrikesharp-with-runtime-linux-1.0.340.zip
1415
STFIXES_LINUX: https://github.com/SharpTimer/STFixes-metamod/releases/download/9-23/stfixes-metamod-9-23-linux.zip
1516
MOVUNLOCKER_LINUX: https://github.com/Source2ZE/MovementUnlocker/releases/download/v1.8/MovementUnlocker-v1.8-linux.tar.gz
1617
RAMPBUGFIX_LINUX: https://github.com/Interesting-exe/CS2Fixes-RampbugFix/releases/download/9-16/CS2Fixes-RampbugFix-9-16-linux.zip
17-
18+
19+
# Windows sources
20+
METAMOD_URL_WINDOWS: https://mms.alliedmods.net/mmsdrop/2.0/mmsource-2.0.0-git1366-windows.zip
21+
CSS_URL_WINDOWS: https://github.com/roflmuffin/CounterStrikeSharp/releases/download/v1.0.340/counterstrikesharp-with-runtime-windows-1.0.340.zip
22+
STFIXES_WINDOWS: https://github.com/SharpTimer/STFixes-metamod/releases/download/9-23/stfixes-metamod-9-23-windows.zip
23+
MOVUNLOCKER_WINDOWS: https://github.com/Source2ZE/MovementUnlocker/releases/download/v1.8/MovementUnlocker-v1.8-windows.zip
24+
RAMPBUGFIX_WINDOWS: https://github.com/Interesting-exe/CS2Fixes-RampbugFix/releases/download/9-16/CS2Fixes-RampbugFix-9-16-windows.zip
25+
26+
# Common extras
1827
CS2_TAGS: https://github.com/schwarper/cs2-tags/releases/download/v1.15/cs2-tags-v1.15.zip
1928
PST_REPO: https://github.com/Letaryat/poor-sharptimer.git
2029
PST_BRANCH: dev
21-
OUT_DIR: bundle
22-
ZIP_NAME: sharptimer-drop-in.zip
30+
31+
# Output names
32+
OUT_LINUX: bundle_linux
33+
OUT_WINDOWS: bundle_windows
34+
ZIP_LINUX: sharptimer-drop-in-linux.zip
35+
ZIP_WINDOWS: sharptimer-drop-in-windows.zip
2336

2437
jobs:
2538
build:
2639
runs-on: ubuntu-latest
27-
2840
steps:
2941
- name: Checkout (optional)
3042
uses: actions/checkout@v4
@@ -33,46 +45,81 @@ jobs:
3345
run: |
3446
sudo apt-get update -y
3547
sudo apt-get install -y unzip zip git
36-
rm -rf "$OUT_DIR" pst out_pst
37-
mkdir -p "$OUT_DIR"
48+
rm -rf "$OUT_LINUX" "$OUT_WINDOWS" pst
49+
mkdir -p "$OUT_LINUX" "$OUT_WINDOWS"
3850
39-
- name: Download Metamod
40-
run: curl -L "$METAMOD_URL_LINUX" -o mmsource.tar.gz
51+
# --------------------- LINUX BUNDLE ---------------------
52+
- name: Download Metamod (Linux)
53+
run: curl -L "$METAMOD_URL_LINUX" -o mms_linux.tar.gz
4154

42-
- name: Extract Metamod into addons/metamod/
43-
run: tar -xzf mmsource.tar.gz -C "$OUT_DIR"
44-
55+
- name: Extract Metamod (Linux) into addons/metamod/
56+
run: tar -xzf mms_linux.tar.gz -C "$OUT_LINUX"
4557

46-
- name: Download CounterStrikeSharp (with runtime)
47-
run: curl -L "$CSS_URL_LINUX" -o css.zip
58+
- name: Download CounterStrikeSharp (Linux)
59+
run: curl -L "$CSS_URL_LINUX" -o css_linux.zip
4860

49-
- name: Extract CounterStrikeSharp into bundle
50-
run: unzip -q css.zip -d "$OUT_DIR"
61+
- name: Extract CounterStrikeSharp (Linux)
62+
run: unzip -q css_linux.zip -d "$OUT_LINUX"
5163

52-
- name: Download STFixes-MetaMod
53-
run: curl -L "$STFIXES_LINUX" -o stfixes.zip
64+
- name: Download STFixes (Linux)
65+
run: curl -L "$STFIXES_LINUX" -o stfixes_linux.zip
5466

55-
- name: Extract STFixes-MetaMod into bundle
56-
run: unzip -q stfixes.zip -d "$OUT_DIR"
67+
- name: Extract STFixes (Linux)
68+
run: unzip -q stfixes_linux.zip -d "$OUT_LINUX"
5769

58-
- name: Download MovementUnlocker
59-
run: curl -L "$MOVUNLOCKER_LINUX" -o movunlocker.tar.gz
70+
- name: Download MovementUnlocker (Linux)
71+
run: curl -L "$MOVUNLOCKER_LINUX" -o mu_linux.tar.gz
6072

61-
- name: Extract MovementUnlocker into bundle
62-
run: tar -xvf movunlocker.tar.gz -C "$OUT_DIR"
73+
- name: Extract MovementUnlocker (Linux)
74+
run: tar -xzf mu_linux.tar.gz -C "$OUT_LINUX"
6375

64-
- name: Download CS2-RamppBugFix
65-
run: curl -L "$RAMPBUGFIX_LINUX" -o rampfix.zip
76+
- name: Download RampBugFix (Linux)
77+
run: curl -L "$RAMPBUGFIX_LINUX" -o ramp_linux.zip
6678

67-
- name: Extract CS2-RampBugFix into bundle
68-
run: unzip -q rampfix.zip -d "$OUT_DIR"
79+
- name: Extract RampBugFix (Linux)
80+
run: unzip -q ramp_linux.zip -d "$OUT_LINUX"
6981

70-
- name: Download CS2-TAGS
82+
- name: Download CS2-Tags (common)
7183
run: curl -L "$CS2_TAGS" -o cs2-tags.zip
7284

73-
- name: Extract CS2-tags into CSS
74-
run: unzip -q cs2-tags.zip -d "$OUT_DIR/addons/counterstrikesharp/"
85+
- name: Extract CS2-Tags into CSS (Linux)
86+
run: unzip -q cs2-tags.zip -d "$OUT_LINUX/addons/counterstrikesharp/"
87+
88+
# --------------------- WINDOWS BUNDLE ---------------------
89+
- name: Download Metamod (Windows)
90+
run: curl -L "$METAMOD_URL_WINDOWS" -o mms_win.zip
91+
92+
- name: Extract Metamod (Windows) into addons/metamod/
93+
run: unzip -q mms_win.zip -d "$OUT_WINDOWS"
94+
95+
- name: Download CounterStrikeSharp (Windows)
96+
run: curl -L "$CSS_URL_WINDOWS" -o css_win.zip
97+
98+
- name: Extract CounterStrikeSharp (Windows)
99+
run: unzip -q css_win.zip -d "$OUT_WINDOWS"
100+
101+
- name: Download STFixes (Windows)
102+
run: curl -L "$STFIXES_WINDOWS" -o stfixes_win.zip
103+
104+
- name: Extract STFixes (Windows)
105+
run: unzip -q stfixes_win.zip -d "$OUT_WINDOWS"
75106

107+
- name: Download MovementUnlocker (Windows)
108+
run: curl -L "$MOVUNLOCKER_WINDOWS" -o mu_win.zip
109+
110+
- name: Extract MovementUnlocker (Windows)
111+
run: unzip -q mu_win.zip -d "$OUT_WINDOWS"
112+
113+
- name: Download RampBugFix (Windows)
114+
run: curl -L "$RAMPBUGFIX_WINDOWS" -o ramp_win.zip
115+
116+
- name: Extract RampBugFix (Windows)
117+
run: unzip -q ramp_win.zip -d "$OUT_WINDOWS"
118+
119+
- name: Extract CS2-Tags into CSS (Windows)
120+
run: unzip -q cs2-tags.zip -d "$OUT_WINDOWS/addons/counterstrikesharp/"
121+
122+
# --------------------- POOR SHARP TIMER (build once) ---------------------
76123
- name: Set up .NET
77124
uses: actions/setup-dotnet@v4
78125
with:
@@ -83,59 +130,78 @@ jobs:
83130
git clone --depth 1 --branch "$PST_BRANCH" "$PST_REPO" pst
84131
echo "PST_COMMIT=$(git -C pst rev-parse --short HEAD)" >> "$GITHUB_ENV"
85132
86-
- name: Restore & Publish PoorSharpTimer
133+
- name: Build PoorSharpTimer
87134
run: |
88135
cd pst
89-
dotnet build
136+
dotnet build -c Release
90137
cd -
91138
92-
- name: Place PoorSharpTimer plugin into bundle
139+
- name: Place PoorSharpTimer into both bundles
93140
run: |
94-
rsync -avrt pst/Build/ $OUT_DIR
141+
for OUT in "$OUT_LINUX" "$OUT_WINDOWS"; do
142+
rsync -avrt pst/Build/ "$OUT/"
143+
done
95144
96-
- name: Show resulting structure (for logs)
145+
# --------------------- LOG & PACKAGE ---------------------
146+
- name: Show resulting structures
97147
run: |
98-
echo "Contents of $OUT_DIR:"
99-
find "$OUT_DIR" -maxdepth 3 -type d -print
148+
echo "=== LINUX ==="
149+
find "$OUT_LINUX" -maxdepth 3 -type d -print
150+
echo "=== WINDOWS ==="
151+
find "$OUT_WINDOWS" -maxdepth 3 -type d -print
100152
101-
- name: Create distributable zip
153+
- name: Create distributable zips
102154
run: |
103-
cd $OUT_DIR
104-
zip -r "../$ZIP_NAME" *
105-
cd -
155+
(cd "$OUT_LINUX" && zip -r "../$ZIP_LINUX" addons)
156+
(cd "$OUT_WINDOWS" && zip -r "../$ZIP_WINDOWS" addons)
106157
107-
- name: Upload artifact (CI)
158+
- name: Upload artifacts (CI)
108159
uses: actions/upload-artifact@v4
109160
with:
110-
name: ${{ env.ZIP_NAME }}
111-
path: ${{ env.ZIP_NAME }}
112-
113-
# - name: Create Git tag
114-
# id: tagger
115-
# run: |
116-
# TAG="bundle-${GITHUB_RUN_NUMBER}"
117-
# echo "tag=$TAG" >> "$GITHUB_OUTPUT"
118-
119-
# - name: Create GitHub Release
120-
# uses: softprops/action-gh-release@v2
121-
# with:
122-
# tag_name: ${{ steps.tagger.outputs.tag }}
123-
# name: Metamod + CounterStrikeSharp + PoorSharpTimer ${{ steps.tagger.outputs.tag }}
124-
# body: |
125-
# Automated bundle built by CI.
126-
127-
# Includes:
128-
# - Metamod: ${{ env.METAMOD_URL }}
129-
# - CounterStrikeSharp (with runtime): ${{ env.CSS_URL }}
130-
# - PoorSharpTimer (branch `${{ env.PST_BRANCH }}`, commit ${{ env.PST_COMMIT }})
131-
132-
# Structure:
133-
# addons/
134-
# metamod/
135-
# counterstrikesharp/
136-
# plugins/poor-sharptimer/*.dll
137-
# configs/poor-sharptimer/ (if present)
138-
# files: |
139-
# ${{ env.ZIP_NAME }}
140-
# env:
141-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161+
name: bundles
162+
path: |
163+
${{ env.ZIP_LINUX }}
164+
${{ env.ZIP_WINDOWS }}
165+
166+
- name: Create Git tag
167+
id: tagger
168+
run: |
169+
TAG="bundle-${GITHUB_RUN_NUMBER}"
170+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
171+
172+
- name: Create GitHub Release
173+
uses: softprops/action-gh-release@v2
174+
with:
175+
tag_name: ${{ steps.tagger.outputs.tag }}
176+
name: CS2 Drop-in Bundles ${{ steps.tagger.outputs.tag }}
177+
body: |
178+
Automated bundle build.
179+
PoorSharpTimer: branch `${{ env.PST_BRANCH }}`, commit ${{ env.PST_COMMIT }}
180+
181+
**Linux sources**
182+
- Metamod: ${{ env.METAMOD_URL_LINUX }}
183+
- CounterStrikeSharp: ${{ env.CSS_URL_LINUX }}
184+
- STFixes: ${{ env.STFIXES_LINUX }}
185+
- MovementUnlocker: ${{ env.MOVUNLOCKER_LINUX }}
186+
- RampBugFix: ${{ env.RAMPBUGFIX_LINUX }}
187+
188+
**Windows sources**
189+
- Metamod: ${{ env.METAMOD_URL_WINDOWS }}
190+
- CounterStrikeSharp: ${{ env.CSS_URL_WINDOWS }}
191+
- STFixes: ${{ env.STFIXES_WINDOWS }}
192+
- MovementUnlocker: ${{ env.MOVUNLOCKER_WINDOWS }}
193+
- RampBugFix: ${{ env.RAMPBUGFIX_WINDOWS }}
194+
195+
**Common**
196+
- CS2-Tags: ${{ env.CS2_TAGS }}
197+
198+
**Structure inside each zip**
199+
addons/
200+
metamod/
201+
counterstrikesharp/
202+
plugins/poor-sharptimer/
203+
files: |
204+
${{ env.ZIP_LINUX }}
205+
${{ env.ZIP_WINDOWS }}
206+
env:
207+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build copy.yml

0 commit comments

Comments
 (0)