Bundler Nuget package for silksong game libraries. Strips and publicizes game libraries for local and CI development.
This package uses semantic versioning and follows the naming scheme (package version)-silksong(silksong version), for example
1.0.0-silksong1.0.28324. This allows the package to seamlessly support multiple game versions. When a new version of the game
is released, we can simply create a new version on nuget targeting that game version, without impacting existing consumers. When
the content of the package itself is changed (e.g. a new file being added to the publicizer) then the package version is bumped.
This section is for people wanting to generate the package for a new game version; if you are just creating mods this section is not relevant to you.
To build this package, you should have ready:
- The version(s) of the game you want to mod
- The dotnet CLI to build (Visual Studio's build environment will not work because it does not support netstandard2.1)
A build script, build-all.sh, is provided to build the package for all supported Silksong versions. This script will automatically build for each version listed in the script. You can optionally specify the build configuration (e.g. Release or Debug) using the -c or --configuration flag (default is Debug):
./build-all.sh -c ReleaseThis will invoke dotnet build for each version, setting the required TargetSilksongVersion property and the specified configuration.
If you want to build for a specific Silksong version, you must set the TargetSilksongVersion property manually:
dotnet build -c Release -p:TargetSilksongVersion=1.0.28324Replace 1.0.28324 with the desired version. The build will fail if TargetSilksongVersion is not set.
- Note down the game version and related Steam depot IDs. Add them in a comment in the csproj so that future builders can retrieve that version to build against it again in the future.
- Copy the contents of the Managed folder to
ref/(game version), for example,ref/1.0.28324
Adding/removing assemblies in the build and/or publicization can be done by adjusting the SystemFiles and GameFiles item groups in the csproj.
A publish script, publish-all.sh, is provided to automate publishing all generated NuGet packages. It will:
- Check that you are on the main branch and that it is up to date with origin/main
- Check that you have no uncommitted changes
- Clean all
.nupkgfiles from the project'sbin/Releasefolder - Run
build-all.shwith Release configuration - Run
dotnet nuget push --skip-duplicatefor all generated packages using an API key you provide
Note: You must run publish-all.sh from the solution directory so that the relative bin/Release path is correct.
- You can provide your NuGet API key as a command line argument:
./publish-all.sh <NUGET_API_KEY> - If not provided, the script will look for a
.nuget_api_keyfile in the project directory and use its contents. - If you provide the key as an argument, it will be saved to
.nuget_api_keyfor future use (this file is gitignored).
Usage:
./publish-all.sh [NUGET_API_KEY]Replace [NUGET_API_KEY] with your NuGet API key, or omit to use the saved key.