Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
softashell committed Jan 25, 2024
1 parent 886e4c3 commit 6067dd4
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/sourcemod-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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
echo version = ${{ steps.setup_sp.outputs.plugin-version }}
working-directory: ${{ env.SCRIPTS_PATH }}
- name: Upload compiled plugins
uses: actions/upload-artifact@v4
with:
name: compiled-plugins
path: |
*.smx

0 comments on commit 6067dd4

Please sign in to comment.