From 45a9bc060a1a43b212ab789e88b28eef74385bbe Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 1 Mar 2026 17:41:20 +0000
Subject: [PATCH 1/7] Initial plan
From 9848718fb8fa17cf820ecb374d561b41b3f1a7fe Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 1 Mar 2026 17:51:24 +0000
Subject: [PATCH 2/7] Replace CI stub-based builds with SteamCMD game DLL
download
Co-authored-by: Brollyy <12004018+Brollyy@users.noreply.github.com>
---
.github/workflows/build-on-pr.yml | 30 +++++++-
.github/workflows/release-new-version.yml | 39 +++++++++--
.github/workflows/setup-game-dlls.yml | 74 ++++++++++++++++++++
BopVisualEffects/BopVisualEffects.csproj | 18 +++--
BopVisualEffects/Stubs/CiGameTypeStubs.cs | 85 -----------------------
5 files changed, 144 insertions(+), 102 deletions(-)
create mode 100644 .github/workflows/setup-game-dlls.yml
delete mode 100644 BopVisualEffects/Stubs/CiGameTypeStubs.cs
diff --git a/.github/workflows/build-on-pr.yml b/.github/workflows/build-on-pr.yml
index cc149cb..75c057f 100644
--- a/.github/workflows/build-on-pr.yml
+++ b/.github/workflows/build-on-pr.yml
@@ -9,7 +9,14 @@ permissions:
contents: read
jobs:
- build-on-pr:
+ setup-game-dlls:
+ uses: ./.github/workflows/setup-game-dlls.yml
+ secrets:
+ STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
+ STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
+
+ build:
+ needs: setup-game-dlls
runs-on: ubuntu-latest
steps:
@@ -21,8 +28,25 @@ jobs:
with:
dotnet-version: 9.0.x
+ - name: Download game DLLs artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: game-dlls
+ path: ~/bits-and-bops/Bits & Bops_Data/Managed
+
+ - name: Create BopVisualEffects.user.props
+ run: |
+ mkdir -p BopVisualEffects
+ cat > BopVisualEffects/BopVisualEffects.user.props << EOF
+
+
+ $HOME/bits-and-bops
+
+
+ EOF
+
- name: Restore
- run: dotnet restore BopVisualEffects.sln -p:SkipGameReferences=true
+ run: dotnet restore BopVisualEffects.sln
- name: Build
- run: dotnet build BopVisualEffects.sln -c Release -p:SkipGameReferences=true --no-restore
+ run: dotnet build BopVisualEffects.sln -c Release --no-restore
diff --git a/.github/workflows/release-new-version.yml b/.github/workflows/release-new-version.yml
index a0106a0..0e14fc8 100644
--- a/.github/workflows/release-new-version.yml
+++ b/.github/workflows/release-new-version.yml
@@ -23,6 +23,7 @@ jobs:
- name: Checkout master
uses: actions/checkout@v4
with:
+ token: ${{ secrets.RELEASE_TOKEN }}
fetch-depth: 0
ref: master
@@ -61,7 +62,7 @@ jobs:
git add BopVisualEffects/BopVisualEffects.csproj
if git diff --cached --quiet; then
echo "No version change detected." >&2
- exit 1
+ exit 0
fi
git commit -m "chore: bump version to v${VERSION}"
@@ -76,15 +77,24 @@ jobs:
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "commit_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
+ setup-game-dlls:
+ uses: ./.github/workflows/setup-game-dlls.yml
+ secrets:
+ STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
+ STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
+
deploy-release-environment:
runs-on: ubuntu-latest
- needs: bump-version
+ needs:
+ - bump-version
+ - setup-game-dlls
environment: release
steps:
- name: Checkout bumped commit
uses: actions/checkout@v4
with:
+ token: ${{ secrets.RELEASE_TOKEN }}
fetch-depth: 0
ref: ${{ needs.bump-version.outputs.commit_sha }}
@@ -93,11 +103,28 @@ jobs:
with:
dotnet-version: 9.0.x
+ - name: Download game DLLs artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: game-dlls
+ path: ~/bits-and-bops/Bits & Bops_Data/Managed
+
+ - name: Create BopVisualEffects.user.props
+ run: |
+ mkdir -p BopVisualEffects
+ cat > BopVisualEffects/BopVisualEffects.user.props << EOF
+
+
+ $HOME/bits-and-bops
+
+
+ EOF
+
- name: Restore
- run: dotnet restore BopVisualEffects.sln -p:SkipGameReferences=true
+ run: dotnet restore BopVisualEffects.sln
- name: Build Release
- run: dotnet build BopVisualEffects.sln -c Release -p:SkipGameReferences=true --no-restore
+ run: dotnet build BopVisualEffects.sln -c Release --no-restore
- name: Package release artifact
run: |
@@ -114,6 +141,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
+ token: ${{ secrets.RELEASE_TOKEN }}
name: BopVisualEffects-v${{ needs.bump-version.outputs.version }}
path: dist/
if-no-files-found: error
@@ -128,12 +156,14 @@ jobs:
- name: Checkout master
uses: actions/checkout@v4
with:
+ token: ${{ secrets.RELEASE_TOKEN }}
fetch-depth: 0
ref: master
- name: Download built artifact
uses: actions/download-artifact@v4
with:
+ token: ${{ secrets.RELEASE_TOKEN }}
name: BopVisualEffects-v${{ needs.bump-version.outputs.version }}
path: dist
@@ -149,6 +179,7 @@ jobs:
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
+ token: ${{ secrets.RELEASE_TOKEN }}
tag_name: v${{ needs.bump-version.outputs.version }}
name: v${{ needs.bump-version.outputs.version }}
files: dist/*
diff --git a/.github/workflows/setup-game-dlls.yml b/.github/workflows/setup-game-dlls.yml
new file mode 100644
index 0000000..3979e73
--- /dev/null
+++ b/.github/workflows/setup-game-dlls.yml
@@ -0,0 +1,74 @@
+name: Setup Game DLLs
+
+on:
+ workflow_call:
+ secrets:
+ STEAM_USERNAME:
+ required: true
+ STEAM_PASSWORD:
+ required: true
+
+jobs:
+ download-dlls:
+ runs-on: ubuntu-latest
+ permissions: {}
+
+ steps:
+ - name: Restore game DLLs from cache
+ id: cache
+ uses: actions/cache@v4
+ with:
+ path: ~/bits-and-bops/Bits & Bops_Data/Managed
+ key: bits-and-bops-managed-${{ github.sha }}
+ restore-keys: bits-and-bops-managed-
+
+ - name: Download game DLLs using SteamCMD
+ env:
+ STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
+ STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
+ run: |
+ set -euo pipefail
+
+ # Skip download if DLLs are already cached
+ if [ -d "$HOME/bits-and-bops/Bits & Bops_Data/Managed" ] && [ -n "$(ls -A "$HOME/bits-and-bops/Bits & Bops_Data/Managed" 2>/dev/null)" ]; then
+ echo "Game DLLs found in cache, skipping download"
+ exit 0
+ fi
+
+ if [ -z "$STEAM_USERNAME" ] || [ -z "$STEAM_PASSWORD" ]; then
+ echo "Error: STEAM_USERNAME and STEAM_PASSWORD secrets are not set"
+ echo "Configure Steam credentials in repository secrets:"
+ echo "1. Go to Settings > Secrets and variables > Actions"
+ echo "2. Add STEAM_USERNAME and STEAM_PASSWORD"
+ echo ""
+ echo "IMPORTANT: Use a dedicated Steam account WITHOUT 2FA/Steam Guard enabled."
+ echo "SteamCMD cannot handle 2FA in automated environments."
+ exit 1
+ fi
+
+ # Install SteamCMD
+ mkdir -p ~/steamcmd
+ cd ~/steamcmd
+ curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
+
+ GAME_DIR="$HOME/bits-and-bops"
+ mkdir -p "$GAME_DIR"
+
+ # Download Bits & Bops (App ID: 1929290)
+ # NOTE: This will FAIL if the Steam account has 2FA/Steam Guard enabled
+ echo "Downloading Bits & Bops from Steam..."
+ ./steamcmd.sh +force_install_dir "$GAME_DIR" \
+ +login "$STEAM_USERNAME" "$STEAM_PASSWORD" \
+ +app_update 1929290 validate \
+ +quit
+
+ echo "Game DLLs downloaded successfully"
+ ls "$GAME_DIR/Bits & Bops_Data/Managed/" | wc -l
+ echo "DLLs found in managed directory"
+
+ - name: Upload game DLLs as artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: game-dlls
+ path: ~/bits-and-bops/Bits & Bops_Data/Managed
+ retention-days: 1
diff --git a/BopVisualEffects/BopVisualEffects.csproj b/BopVisualEffects/BopVisualEffects.csproj
index 19f78c8..b85ae68 100644
--- a/BopVisualEffects/BopVisualEffects.csproj
+++ b/BopVisualEffects/BopVisualEffects.csproj
@@ -27,8 +27,6 @@
- true
- $(DefineConstants);SKIP_GAME_REFERENCES
$(BOP_GAME_ROOT)
$(GameRoot)/BepInEx
$(GameRoot)/BepInEx/plugins
@@ -40,24 +38,24 @@
-
-
+
+
$(UnityManagedDir)/UnityEngine.dll
false
-
+
$(UnityManagedDir)/UnityEngine.CoreModule.dll
false
-
+
$(UnityManagedDir)/UnityEngine.IMGUIModule.dll
false
-
+
$(UnityManagedDir)/UnityEngine.AssetBundleModule.dll
false
-
+
$(UnityManagedDir)/%(Identity).dll
false
@@ -72,7 +70,7 @@
Condition="Exists('Resources\bopvisualeffects_shaders_linux.assetbundle')" />
-
+
@@ -86,7 +84,7 @@
+ Condition="'$(BepInExPluginsDir)' != '' and Exists('$(BepInExPluginsDir)')">
diff --git a/BopVisualEffects/Stubs/CiGameTypeStubs.cs b/BopVisualEffects/Stubs/CiGameTypeStubs.cs
deleted file mode 100644
index 9a7e70a..0000000
--- a/BopVisualEffects/Stubs/CiGameTypeStubs.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-#if SKIP_GAME_REFERENCES
-#pragma warning disable CA1050 // Declare types in namespaces — stubs mirror global-namespace game types
-#pragma warning disable CA1051 // Do not declare visible instance fields — stubs mirror Unity-serialized public fields
-#pragma warning disable CA1822 // Mark members as static — stubs must match real instance method signatures
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-
-public enum SceneKey
-{
- Unknown = 0,
- MixtapeEditor = 1
-}
-
-public sealed class MixtapeEventTemplate
-{
- public string dataModel = string.Empty;
- public float length;
- public bool resizable;
- public Dictionary properties = [];
-}
-
-public static class MixtapeEventTemplates
-{
- public static readonly Dictionary> entities = [];
-}
-
-public sealed class Entity
-{
- public string dataModel = string.Empty;
- public float length;
- public float beat;
- public readonly Dictionary properties = [];
-
- public float GetFloat(string key)
- {
- if (!properties.TryGetValue(key, out object? value) || value is null)
- return 0f;
-
- return value switch
- {
- float floatValue => floatValue,
- double doubleValue => (float)doubleValue,
- int intValue => intValue,
- _ => 0f
- };
- }
-}
-
-public sealed class MixtapeLoaderCustom : MonoBehaviour
-{
- public readonly Scheduler scheduler = new();
- public JukeboxScript? jukebox;
-}
-
-public sealed class Scheduler
-{
- public void Schedule(float beat, Action? callback)
- {
- callback?.Invoke();
- }
-}
-
-public sealed class JukeboxScript : MonoBehaviour
-{
- public float CurrentBeat { get; set; }
-}
-
-public sealed class GameplayScript : MonoBehaviour
-{
- public MonoBehaviour? cameraScript;
-}
-
-public sealed class MixtapeEditorScript
-{
-}
-
-public static class TempoSceneManager
-{
- public static SceneKey GetActiveSceneKey()
- {
- return SceneKey.Unknown;
- }
-}
-#endif
From f90bb808145329fede154af0c555acd5ae22cb3a Mon Sep 17 00:00:00 2001
From: Brollyy
Date: Sun, 1 Mar 2026 19:02:32 +0100
Subject: [PATCH 3/7] Update .github/workflows/setup-game-dlls.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
.github/workflows/setup-game-dlls.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/setup-game-dlls.yml b/.github/workflows/setup-game-dlls.yml
index 3979e73..eb5428d 100644
--- a/.github/workflows/setup-game-dlls.yml
+++ b/.github/workflows/setup-game-dlls.yml
@@ -19,8 +19,8 @@ jobs:
uses: actions/cache@v4
with:
path: ~/bits-and-bops/Bits & Bops_Data/Managed
- key: bits-and-bops-managed-${{ github.sha }}
- restore-keys: bits-and-bops-managed-
+ key: bits-and-bops-1929290-managed-${{ runner.os }}-v1
+ restore-keys: bits-and-bops-1929290-managed-${{ runner.os }}-
- name: Download game DLLs using SteamCMD
env:
From ee22cb5a9bffcb2ad3557c31972f3c18135a42ff Mon Sep 17 00:00:00 2001
From: Brollyy
Date: Sun, 1 Mar 2026 19:03:50 +0100
Subject: [PATCH 4/7] Update .github/workflows/release-new-version.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
.github/workflows/release-new-version.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/release-new-version.yml b/.github/workflows/release-new-version.yml
index 0e14fc8..b62e912 100644
--- a/.github/workflows/release-new-version.yml
+++ b/.github/workflows/release-new-version.yml
@@ -141,7 +141,6 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
- token: ${{ secrets.RELEASE_TOKEN }}
name: BopVisualEffects-v${{ needs.bump-version.outputs.version }}
path: dist/
if-no-files-found: error
From a391331dcd2ef6e1d6e7b67c35ee17643ba2048e Mon Sep 17 00:00:00 2001
From: Brollyy
Date: Sun, 1 Mar 2026 19:04:10 +0100
Subject: [PATCH 5/7] Update .github/workflows/release-new-version.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
.github/workflows/release-new-version.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-new-version.yml b/.github/workflows/release-new-version.yml
index b62e912..7e4e20b 100644
--- a/.github/workflows/release-new-version.yml
+++ b/.github/workflows/release-new-version.yml
@@ -162,7 +162,7 @@ jobs:
- name: Download built artifact
uses: actions/download-artifact@v4
with:
- token: ${{ secrets.RELEASE_TOKEN }}
+ github-token: ${{ secrets.RELEASE_TOKEN }}
name: BopVisualEffects-v${{ needs.bump-version.outputs.version }}
path: dist
From 0f9ecde13e179c5df4a11061ac0793a484364a39 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 1 Mar 2026 18:10:46 +0000
Subject: [PATCH 6/7] Fix CI build and analyzer failures; address review
comments
Co-authored-by: Brollyy <12004018+Brollyy@users.noreply.github.com>
---
.github/workflows/format-and-style.yml | 29 +++++++++++++++++++++++-
BopVisualEffects/BopVisualEffects.csproj | 2 +-
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/format-and-style.yml b/.github/workflows/format-and-style.yml
index 74fcae0..cc36311 100644
--- a/.github/workflows/format-and-style.yml
+++ b/.github/workflows/format-and-style.yml
@@ -5,7 +5,16 @@ on:
branches: ["master"]
merge_group:
+permissions:
+ contents: read
+
jobs:
+ setup-game-dlls:
+ uses: ./.github/workflows/setup-game-dlls.yml
+ secrets:
+ STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
+ STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
+
whitespace-format:
runs-on: ubuntu-latest
@@ -43,6 +52,7 @@ jobs:
run: dotnet format style BopVisualEffects.sln --no-restore --verify-no-changes --verbosity minimal --exclude BopVisualEffects/obj
analyzers:
+ needs: setup-game-dlls
runs-on: ubuntu-latest
steps:
@@ -54,8 +64,25 @@ jobs:
with:
dotnet-version: 9.0.x
+ - name: Download game DLLs artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: game-dlls
+ path: ~/bits-and-bops/Bits & Bops_Data/Managed
+
+ - name: Create BopVisualEffects.user.props
+ run: |
+ mkdir -p BopVisualEffects
+ cat > BopVisualEffects/BopVisualEffects.user.props << EOF
+
+
+ $HOME/bits-and-bops
+
+
+ EOF
+
- name: Restore
- run: dotnet restore BopVisualEffects.sln -p:SkipGameReferences=true
+ run: dotnet restore BopVisualEffects.sln
- name: Verify analyzer rules
run: dotnet format analyzers BopVisualEffects.sln --no-restore --verify-no-changes --verbosity minimal --exclude BopVisualEffects/obj
diff --git a/BopVisualEffects/BopVisualEffects.csproj b/BopVisualEffects/BopVisualEffects.csproj
index b85ae68..c12a2eb 100644
--- a/BopVisualEffects/BopVisualEffects.csproj
+++ b/BopVisualEffects/BopVisualEffects.csproj
@@ -38,7 +38,7 @@
-
+
$(UnityManagedDir)/UnityEngine.dll
false
From 3f95343743d5271118f26d138369203608827509 Mon Sep 17 00:00:00 2001
From: Brollyy
Date: Sun, 1 Mar 2026 19:14:19 +0100
Subject: [PATCH 7/7] Apply suggestion from @Brollyy
---
.github/workflows/build-on-pr.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build-on-pr.yml b/.github/workflows/build-on-pr.yml
index 75c057f..aba3a81 100644
--- a/.github/workflows/build-on-pr.yml
+++ b/.github/workflows/build-on-pr.yml
@@ -15,7 +15,7 @@ jobs:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
- build:
+ build-on-pr:
needs: setup-game-dlls
runs-on: ubuntu-latest