diff --git a/.github/workflows/sourcemod-plugin.yml b/.github/workflows/sourcemod-plugin.yml new file mode 100644 index 0000000..804f45c --- /dev/null +++ b/.github/workflows/sourcemod-plugin.yml @@ -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 \ No newline at end of file