Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup CI #149

Open
Alexejhero opened this issue Mar 6, 2024 · 2 comments
Open

Setup CI #149

Alexejhero opened this issue Mar 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Alexejhero
Copy link
Member

No description provided.

@Alexejhero Alexejhero converted this from a draft issue Mar 6, 2024
@Alexejhero Alexejhero added the enhancement New feature or request label Mar 6, 2024
@GeekCornerGH
Copy link

Hi, I may make a PR to implement CI, just tell me what you'd like the CI to do @Alexejhero

@Alexejhero
Copy link
Member Author

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)

AmongUsafk added a commit to AmongUsafk/Submerged that referenced this issue May 17, 2024
Related to SubmergedAmongUs#149

Implements CI workflow and adds build data file as specified.
- Adds a new GitHub Actions workflow file `ci.yml` to automate the build process, including steps for restoring NuGet packages, building the mod in both debug and release configurations, and uploading the resulting DLLs as artifacts.
- Introduces a `build_data.json` file containing the specified JSON structure for build path and dependencies, including download links and paths for BepInEx and Reactor dependencies.

---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants