Skip to content

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

License

Notifications You must be signed in to change notification settings

rumblefrog/setup-sp

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date
Jul 6, 2022
Nov 16, 2019
Aug 31, 2024
Jul 25, 2023
Nov 16, 2019
Jul 6, 2022
Nov 18, 2019
Nov 14, 2019
Mar 13, 2023
Aug 31, 2024
Jan 23, 2025
Aug 31, 2024
Jul 6, 2022
Oct 8, 2021

Repository files navigation

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.