Skip to content
aperture

GitHub Action

Build NorthwoodPluginAPI based plugin

v2.0.1 Latest version

Build NorthwoodPluginAPI based plugin

aperture

Build NorthwoodPluginAPI based plugin

Builds, runs tests and uploads artifacts for NwPluginAPI based plugin

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Build NorthwoodPluginAPI based plugin

uses: Pogromca-SCP/build-nwapi-plugin@v2.0.1

Learn more about this action in Pogromca-SCP/build-nwapi-plugin

Choose a version

Pogromca-SCP/build-nwapi-plugin

GitHub release GitHub license GitHub dependents GitHub last commit

GitHub Action for NwPluginAPI based plugin development. Performs project build, runs tests and uploads artifacts with zipped dependencies.

This action does not provide a .NET environment! You need to setup it on your own before running this action.

Inputs

Input Description Required Default value
plugin-name Name of main plugin assembly/project to package. true
refs-variable Name of game files references environment variable used in the project. Triggers game files download when set. false $null
depot-downloader-version Depot downloader version to use for game files download. Takes effect only when refs-variable is set. Check version compatibility table below for valid values. false 2.7.4
run-tests Whether or not the tests should be run for the project. false true
initial-test-runs Amount of initial test runs. Takes effect only when refs-variable is set and run-tests is set to true. false 3
dependencies List of assembly/project names to add into dependencies.zip file. false @()
bin-path Binary files path pattern to use, $ is replaced with assembly/project name. false /$/bin/Release/net48/$
includes Other non-project assemblies/files to add into dependencies.zip file (full paths). false @()
configuration Project build configuration. Consider changing bin-path input value alongside this. false Release

Version compatibility

Version Supported depot downloader version
2.x.x >= 2.6.0
< 2.0.0 < 2.6.0

Examples

Minimal setup

jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v4
    
    - name: Setup .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x
        
    - name: Build, test and upload artifacts
      uses: Pogromca-SCP/build-nwapi-plugin@v2
      with:
        plugin-name: MyPlugin

Minimal setup with game files download

jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v4
    
    - name: Setup .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x
        
    - name: Build, test and upload artifacts
      uses: Pogromca-SCP/build-nwapi-plugin@v2
      with:
        plugin-name: MyPlugin
        refs-variable: SL_REFERENCES # Name of your environment variable used to reference SCP:SL files

With dependency projects and adjusted bin paths

jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v4
    
    - name: Setup .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x
        
    - name: Build, test and upload artifacts
      uses: Pogromca-SCP/build-nwapi-plugin@v2
      with:
        plugin-name: MyPlugin
        dependencies: MyPlugin.CoreLib,MyPlugin.Utils
        bin-path: /$/bin/Release/$ # Adjust bin path to match your project configuration

With third-party dependencies

jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v4
    
    - name: Setup .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x
        
    - name: Build, test and upload artifacts
      uses: Pogromca-SCP/build-nwapi-plugin@v2
      with:
        plugin-name: MyPlugin
        includes: MyPlugin/bin/Harmony0.dll,README.md # Any file type can be added

Without tests

jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v4
    
    - name: Setup .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x
        
    - name: Build and upload artifacts
      uses: Pogromca-SCP/build-nwapi-plugin@v2
      with:
        plugin-name: MyPlugin
        run-tests: false