Skip to content

Reset plugin state on player spawn or round start #10

Reset plugin state on player spawn or round start

Reset plugin state on player spawn or round start #10

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