This action sets-up, cache and adds sourcemod scripting directory to the path
Find a file
2023-03-13 05:01:30 -04:00
.github/workflows fix: sp 1.12+ include path resolution (#6) 2022-07-06 17:32:57 -04:00
__tests__ workflow: self test 2019-11-16 01:44:25 -05:00
lib fix: actions set output deprecation warning 2023-03-13 05:01:30 -04:00
src option: no spcomp proxy (#8) 2022-07-14 01:17:21 -04:00
.gitattributes workflow: self test 2019-11-16 01:44:25 -05:00
.gitignore fix: sp 1.12+ include path resolution (#6) 2022-07-06 17:32:57 -04:00
action.yml option: no spcomp proxy (#8) 2022-07-14 01:17:21 -04:00
CODEOWNERS git: code owners 2019-11-17 20:16:14 -05:00
LICENSE Initial commit 2019-11-14 12:45:55 -05:00
package.json build(deps): bump @actions/core from 1.9.0 to 1.9.1 (#10) 2022-11-19 10:44:35 -05:00
README.md fix: actions set output deprecation warning 2023-03-13 05:01:30 -04:00
tsconfig.json fix: sp 1.12+ include path resolution (#6) 2022-07-06 17:32:57 -04:00
webpack.config.js Add a parser to get the version of the .sp plugin (#4) 2021-10-08 19:09:08 -04:00
yarn.lock fix: actions set output deprecation warning 2023-03-13 05:01:30 -04:00

Setup SourcePawn Action

This action sets-up, cache and adds sourcemod scripting directory to the path

Usage

See action.yml

Basic:

steps:
- uses: actions/checkout@v3

- uses: rumblefrog/setup-sp@master
  with:
    version: '1.12.x'

- run: spcomp -iAnotherIncludeDirectory plugin.sp -o output/plugin.smx

Matrix:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        sm-version: [ '1.11.x', '1.12.x', '1.11.6467', '>= 1.11.6478']

    name: SM version ${{ matrix.sm-version }}
    steps:
      - uses: actions/checkout@v3

      - name: Setup SP
        uses: rumblefrog/setup-sp@master
        with:
          version: ${{ matrix.sm-version }}

      - run: spcomp -iAnotherIncludeDirectory plugin.sp -o output/plugin.smx

Extract the version of the .sp file:

jobs:
  build:
    runs-on: ubuntu-latest

    name: SM version ${{ matrix.sm-version }}
    steps:
      - uses: actions/checkout@v1

      - name: Setup SP
        id: setup_sp
        uses: rumblefrog/setup-sp@master
        with:
          version: '1.10.x'
          version-file: ./plugin.sp

      - run: |
          spcomp -iAnotherIncludeDirectory plugin.sp -o output/plugin.smx
          echo Plugin version ${{ steps.setup_sp.outputs.plugin-version }}          

A complete workflow example can be found here.