-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 1.1 KB
/
build.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
name: Build
on:
workflow_dispatch:
workflow_call:
push:
paths-ignore:
- "**.md"
- "**.spr"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup AMXXPawn Compiler
uses: wopox1337/setup-amxxpawn@v1
- name: Compile plugins
working-directory: cstrike/addons/amxmodx/scripting/
run: |
compile() {
sourcefile=$1
amxxfile="$(echo $sourcefile | sed -e 's/\.sma$/.amxx/')"
output_path="../plugins/$amxxfile"
mkdir -p $(dirname $output_path)
echo -n "Compiling $sourcefile ... "
amxxpc "$sourcefile" -o"$output_path" -i"include" && echo "Done"
}
export -f compile
# Найти и скомпилировать все .sma файлы в папке scripting
find . -type f -name "*.sma" -exec bash -c 'compile "$0"' {} \;
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.repository }}
path: cstrike