From 2a6f0291e1524ca17b0612f1861046375cf4d4a7 Mon Sep 17 00:00:00 2001 From: qe201020335 Date: Tue, 28 Oct 2025 01:09:27 -0400 Subject: [PATCH 1/2] Use BSMT `OutputCopy` --- .github/workflows/main.yml | 59 ++++++------------------------ BeatSaberSDK/BeatSaberSDK.csproj | 25 ++----------- BeatSaberSDK/Directory.Build.props | 17 +++++++++ 3 files changed, 32 insertions(+), 69 deletions(-) create mode 100644 BeatSaberSDK/Directory.Build.props diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4fe78a3..d48b251 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,65 +27,28 @@ jobs: uses: Goobwabber/download-beatmods-deps@1.3 with: manifest: ${{ github.workspace }}/BeatSaberSDK/manifest.json - - name: Generate BeatSaberDir override (.csproj.user) - shell: pwsh - run: | - # Path to the project file (adjust if the name or folder changes) - $projPath = "$Env:GITHUB_WORKSPACE\BeatSaberSDK\BeatSaberSDK.csproj" - $userFile = "$projPath.user" - - # Compute the absolute path to Refs - $refsPath = [IO.Path]::GetFullPath((Join-Path $Env:GITHUB_WORKSPACE 'Refs')) - - @" - - - $refsPath - - - "@ | Out-File -FilePath $userFile -Encoding utf8 -Force - - Write-Host "Created $userFile with BeatSaberDir = $refsPath" - name: Build id: Build run: dotnet build --configuration Release - - name: GitStatus - run: git status - - name: Package output as zip (Libs\ & Plugins\) - id: package - shell: pwsh - run: | - $buildDir = "$Env:GITHUB_WORKSPACE\BeatSaberSDK\bin\Release\net48" - $packageDir = "$Env:GITHUB_WORKSPACE\package" - $libsDir = Join-Path $packageDir 'Libs' - $pluginsDir = Join-Path $packageDir 'Plugins' - - New-Item $libsDir -ItemType Directory -Force | Out-Null - New-Item $pluginsDir -ItemType Directory -Force | Out-Null - - Copy-Item "$buildDir\Reactive.Components.dll" $libsDir - Copy-Item "$buildDir\Reactive.dll" $libsDir - Copy-Item "$buildDir\Reactive.BeatSaber.Components.dll" $pluginsDir - Copy-Item "$buildDir\Reactive.BeatSaber.Components.pdb" $pluginsDir - Copy-Item "$buildDir\Reactive.Components.pdb" $pluginsDir - Copy-Item "$buildDir\Reactive.pdb" $pluginsDir - - $zipPath = "$Env:GITHUB_WORKSPACE\beat-saber-sdk.zip" - Compress-Archive -Path "$packageDir\*" -DestinationPath $zipPath -Force - - "zipfile=$zipPath" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append - "packagedir=$packageDir" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append + env: + BeatSaberDir: ${{ github.workspace }}/Refs/ - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: beat-saber-sdk - path: ${{ steps.package.outputs.packagedir }} + name: ${{ steps.Build.outputs.filename }} + path: ${{ steps.Build.outputs.artifactpath }} + + - name: Zip Artifact for Release + run: Compress-Archive -Path "${{ steps.Build.outputs.artifactpath }}\*" -DestinationPath "./${{ steps.Build.outputs.filename }}.zip" + if: startsWith(github.ref, 'refs/tags/') - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: ${{ steps.package.outputs.zipfile }} + draft: true + generate_release_notes: true + files: ./${{ steps.Build.outputs.filename }}.zip env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/BeatSaberSDK/BeatSaberSDK.csproj b/BeatSaberSDK/BeatSaberSDK.csproj index 893be33..ccbadc5 100644 --- a/BeatSaberSDK/BeatSaberSDK.csproj +++ b/BeatSaberSDK/BeatSaberSDK.csproj @@ -3,7 +3,7 @@ net48 Library ..\Refs - $(LocalRefsDir) + $(LocalRefsDir) $(MSBuildProjectDirectory)\ latest enable @@ -19,6 +19,9 @@ + + + $(BeatSaberDir)\Beat Saber_Data\Managed @@ -82,26 +85,6 @@ - - - $(BeatSaberDir)\Plugins - $(BeatSaberDir)\Libs - bin\$(Configuration)\net48\Reactive - - - - - - - - - - - - - all diff --git a/BeatSaberSDK/Directory.Build.props b/BeatSaberSDK/Directory.Build.props new file mode 100644 index 0000000..cb17ea5 --- /dev/null +++ b/BeatSaberSDK/Directory.Build.props @@ -0,0 +1,17 @@ + + + + + BSIPA + false + + + + + + + + + + + \ No newline at end of file From 2f1412ac19d085c39d1e201fec7dab431da83b8c Mon Sep 17 00:00:00 2001 From: qe201020335 Date: Tue, 28 Oct 2025 19:28:55 -0400 Subject: [PATCH 2/2] Disable CI release --- .github/workflows/main.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d48b251..21e3e31 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,16 +39,17 @@ jobs: name: ${{ steps.Build.outputs.filename }} path: ${{ steps.Build.outputs.artifactpath }} - - name: Zip Artifact for Release - run: Compress-Archive -Path "${{ steps.Build.outputs.artifactpath }}\*" -DestinationPath "./${{ steps.Build.outputs.filename }}.zip" - if: startsWith(github.ref, 'refs/tags/') - - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - draft: true - generate_release_notes: true - files: ./${{ steps.Build.outputs.filename }}.zip - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} +# Temporarily disable creating releases until we have a proper way to include yoga.dll +# - name: Zip Artifact for Release +# run: Compress-Archive -Path "${{ steps.Build.outputs.artifactpath }}\*" -DestinationPath "./${{ steps.Build.outputs.filename }}.zip" +# if: startsWith(github.ref, 'refs/tags/') +# +# - name: Release +# uses: softprops/action-gh-release@v1 +# if: startsWith(github.ref, 'refs/tags/') +# with: +# draft: true +# generate_release_notes: true +# files: ./${{ steps.Build.outputs.filename }}.zip +# env: +# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}