Compile

action compile

Compiles C# code using msbuild into a mod assembly. This action will install any dependent mods declared in the csproj file and restore NuGet packages.

Warning

Due to the handover of the Mono project, the ubuntu-latest github runner does not currently include mono or nuget.

Please use the ubuntu-22.04 runner for this action.

Example

- uses: KSPModdingLibs/KSPBuildTools/.github/actions/compile@0.0.3-alpha.1

Inputs

input build-configuration
Default:
Release

The project configuration to build.

input ksp-zip-url
Default:
https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip

A url for a zip file that contains the assemblies from the game to link against. This should either be stripped so that it only contains public interfaces, or encrypted so that the libraries are not being redistributed unprotected. Defaults to KSP 1.12.5 with stripped versions of the libraries which should be suitable for most users. It does not require a password.

input ksp-zip-password

If the ksp library zip is encrypted, this is the password. It should be stored in your repository’s secrets.

input solution-file-path

The path to the solution file to build. Defaults to empty, which will invoke msbuild on the root directory of the repo and builds any *.sln file it finds there.

input working-directory
Default:
${{ github.workspace }}

the working directory to run in

Environment Variables

env KSP_ROOT

The path to use as the root of a KSP instance for CKAN to set-up. If not set, /tmp/ksp is used instead.