-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (63 loc) · 1.74 KB
/
sourcemod-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
name: Compile with SourceMod
on:
pull_request:
branches: master
push:
branches: master
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set environment variables
run: echo SCRIPTS_PATH=$(pwd) >> $GITHUB_ENV
- name: Setup SourcePawn Compiler ${{ matrix.SM_VERSION }}
id: setup_sp
uses: rumblefrog/setup-sp@master
with:
version: '1.11.x'
- name: Checkout neotokyo include repo
uses: actions/checkout@v4
with:
repository: softashell/sourcemod-nt-include
path: sourcemod-nt-include
- name: Compile plugins
run: |
for file in ./scripting/*.sp
do
echo -e "\nCompiling $file..."
spcomp -E -w234 -O2 -v2 -i ./scripting/include -i ./sourcemod-nt-include/scripting/include $file
done
echo "===OUT FILES==="
ls *.smx
working-directory: ${{ env.SCRIPTS_PATH }}
- name: Upload compiled plugins
uses: actions/upload-artifact@v4
with:
name: compiled-plugins
path: |
*.smx
release:
if: github.ref_name == 'master'
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/download-artifact@v4
with:
name: compiled-plugins
path: release
- name: Update latest release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: latest
name: 'Latest release'
prerelease: false
body: 'Compiled NT plugins'
files: |
./release/*.smx