Please allow mods to be built using Github Actions
saikek opened this issue ยท 2 comments
Is there a way to build mod without actual game ?
Or what is the minimal set of files that is needed to build it ?
Or is it possible to do a verbose logging to list what it is looking for ?
I'm trying to add automatic build using Github Actions to some abandoned mods, but it does not work, complaining on game missing:
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: build project
run: >
cd "GeneralMods/SaveAnywhere" &&
mkdir Result &&
dotnet restore -p:GamePath=Result &&
dotnet build --no-restore -p:GamePath=Result
/home/runner/.nuget/packages/pathoschild.stardew.modbuildconfig/3.2.2/build/Pathoschild.Stardew.ModBuildConfig.targets(72,5): error : The mod build package found a game folder at Result, but it doesn't contain the StardewValley file. If this folder is invalid, delete it and the package will autodetect another game install path. [/home/runner/work/Stardew_Valley_Mods/Stardew_Valley_Mods/GeneralMods/SaveAnywhere/SaveAnywhere.csproj]
I think mods can't be build without the game, because SMAPI and mods refers SDV assembly. Due to copyright it's not possible to build it on public CI servers, because it's share a game binaries/executables and it may be prohibited. Only one way how to build mods on CI, is run your private server in your private network and install the game executable assembly and their dependecies with SMAPI and build it on your private server. Keep it private only for your access. But I know, not everyone can run their own CI server at home or buy private server hosting for do that.
The minimum files needed to compile a SMAPI mod (as of this message) are:
Netcode.dll
Stardew Valley.exe
StardewModdingAPI.exe
StardewValley.GameData.dll
xTile.dll
smapi-internal/
0Harmony.dll (only if the mod uses Harmony)
SMAPI.Toolkit.CoreInterfaces.dll
The list may change in future updates. You can check by just renaming your game folder, creating a new one with the minimal files, and trying to rebuild a mod.
Feel free to ask in #making-mods on Discord if you have any other questions!