Submerged
Submerged copied to clipboard
Setup CI
Hi, I may make a PR to implement CI, just tell me what you'd like the CI to do @Alexejhero
CI steps should look like this:
On push to main or develop or PR to main or develop
- Clone the repo
- Restore nuget packages
- Build the mod in debug and attach the file as an artifact
- Build the mod in release and attach the file as an artifact
If the action was triggered by push to main, also do the following:
- Find the latest DRAFT release in the repo, if there is none, abort
- Attach the release dll to the draft release, overriding old files if they exist
- Download the external dependencies (BepInEx, Reactor) from a build data file
- Setup an appropriate folder structure including the dependencies and the built mod
- Zip up the result and attach it to the draft release as well, overriding old files if they exist
There's no build data file in the repo yet, but I imagine it would look something like this:
{
"build": {
"path": "BepInEx/plugins"
},
"dependencies": {
"BepInEx": {
"download": "https://builds.bepinex.dev/projects/bepinex_be/688/BepInEx-Unity.IL2CPP-win-x86-6.0.0-be.688%2B4901521.zip",
"path": ".",
"unarchive": true
},
"Reactor": {
"download": "https://github.com/NuclearPowered/Reactor/releases/download/2.2.0/Reactor.dll",
"path": "BepInEx/plugins"
}
}
}
Copying the mod dll to build.path can be hardcoded, as in we don't have to worry about multiple csprojects because Submerged is and will always be compiled down to a single DLL, so it's enough to copy the release dll to whatever the path says.
Since the unity assetbundle file is committed in the repo for now, I left out any CI steps for the unity project, that can be figured out later (I'm not even sure if there should be CI or not for it)