This action sets-up, cache and adds sourcemod scripting directory to the path
Find a file
2024-08-30 23:45:00 -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 chore: build with newer nodejs (#21) 2024-08-30 23:33:57 -04:00
src Update parser.ts to fully support semver (#15) 2023-07-25 17:37:56 -05: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 chore: bump action nodejs version 2024-08-30 23:45:00 -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-lock.json chore: build with newer nodejs (#21) 2024-08-30 23:33:57 -04:00
package.json chore: build with newer nodejs (#21) 2024-08-30 23:33:57 -04: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

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.