This repository was archived by the owner on Sep 16, 2025. It is now read-only.
Release #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| inputs: | |
| create_release: | |
| description: 'Create a GitHub release' | |
| required: false | |
| default: 'true' | |
| type: choice | |
| options: | |
| - 'true' | |
| - 'false' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Collect build info | |
| id: info | |
| run: | | |
| SHA_SHORT=$(git rev-parse --short HEAD) | |
| echo "sha_short=$SHA_SHORT" >> $GITHUB_OUTPUT | |
| VERSION=$(grep -oP '(?<=<Version>)[^<]+' BepisLoader.csproj) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Version found: $VERSION" | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "9.0.x" | |
| - name: Checkout BepInEx | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ResoniteModding/BepInEx | |
| path: BepInEx | |
| ref: master | |
| submodules: recursive | |
| - name: Build BepInEx | |
| run: | | |
| cd BepInEx | |
| chmod +x build.sh | |
| ./build.sh | |
| echo "BepInEx build completed" | |
| ls -la bin/NET.CoreCLR/net9.0/ | |
| cd .. | |
| - name: Build BepisLoader | |
| run: | | |
| dotnet build -c Release BepisLoader.csproj | |
| echo "BepisLoader build completed" | |
| ls -la bin/Release/net9.0/ | |
| - name: Checkout BepInExResoniteShim | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ResoniteModding/BepInExResoniteShim | |
| path: BepInExResoniteShim | |
| ref: master | |
| submodules: recursive | |
| - name: Build ResoniteShim | |
| run: | | |
| cd BepInExResoniteShim | |
| dotnet build -c Release | |
| echo "ResoniteShim build completed" | |
| ls -la bin/Release/net9.0/ | |
| cd .. | |
| - name: Prepare common release files | |
| run: | | |
| # Create directory structure for both platforms | |
| for platform in linux windows; do | |
| mkdir -p release/$platform | |
| mkdir -p release/$platform/BepInEx/core | |
| mkdir -p release/$platform/BepInEx/patchers | |
| mkdir -p release/$platform/BepInEx/plugins | |
| # Copy BepisLoader files | |
| cp bin/Release/net9.0/BepisLoader.dll release/$platform/ | |
| cp bin/Release/net9.0/BepisLoader.pdb release/$platform/ | |
| cp bin/Release/net9.0/BepisLoader.deps.json release/$platform/ | |
| # Copy BepInEx core files | |
| cp BepInEx/bin/NET.CoreCLR/net9.0/*.dll release/$platform/BepInEx/core/ || true | |
| cp BepInEx/bin/NET.CoreCLR/net9.0/*.pdb release/$platform/BepInEx/core/ || true | |
| cp BepInEx/bin/NET.CoreCLR/net9.0/*.xml release/$platform/BepInEx/core/ || true | |
| cp BepInEx/bin/NET.CoreCLR/net9.0/*.json release/$platform/BepInEx/core/ || true | |
| # Copy ResoniteShim to plugins | |
| cp BepInExResoniteShim/bin/Release/net9.0/BepInExResoniteShim.dll release/$platform/BepInEx/plugins/ | |
| done | |
| echo "Common files prepared for both platforms" | |
| - name: Configure Linux release | |
| run: | | |
| # Create Linux-specific runtimeconfig.json | |
| cat > release/linux/BepisLoader.runtimeconfig.json << 'EOF' | |
| { | |
| "runtimeOptions": { | |
| "tfm": "net9.0", | |
| "frameworks": [ | |
| { | |
| "name": "Microsoft.NETCore.App", | |
| "version": "9.0.0" | |
| } | |
| ], | |
| "configProperties": { | |
| "System.Reflection.Metadata.MetadataUpdater.IsSupported": false, | |
| "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false | |
| } | |
| } | |
| } | |
| EOF | |
| # Create Linux zip | |
| cd release/linux | |
| zip -r ../BepisLoader-${{ steps.info.outputs.version }}-linux.zip . | |
| cd ../.. | |
| echo "Linux release created" | |
| - name: Configure Windows release | |
| run: | | |
| # Create Windows-specific runtimeconfig.json with WindowsDesktop.App | |
| cat > release/windows/BepisLoader.runtimeconfig.json << 'EOF' | |
| { | |
| "runtimeOptions": { | |
| "tfm": "net9.0", | |
| "frameworks": [ | |
| { | |
| "name": "Microsoft.NETCore.App", | |
| "version": "9.0.0" | |
| }, | |
| { | |
| "name": "Microsoft.WindowsDesktop.App", | |
| "version": "9.0.0" | |
| } | |
| ], | |
| "configProperties": { | |
| "System.Reflection.Metadata.MetadataUpdater.IsSupported": false, | |
| "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false | |
| } | |
| } | |
| } | |
| EOF | |
| # Add hookfxr files from lib directory | |
| cp lib/hostfxr.dll release/windows/ | |
| cp lib/hostfxr.pdb release/windows/ | |
| cp lib/hostfxr/hookfxr.ini release/windows/ | |
| # Create Windows zip | |
| cd release/windows | |
| zip -r ../BepisLoader-${{ steps.info.outputs.version }}-windows.zip . | |
| cd ../.. | |
| echo "Windows release created" | |
| - name: Create Git Tag | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| run: | | |
| TAG_NAME="${{ steps.info.outputs.version }}" | |
| if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then | |
| echo "Tag $TAG_NAME already exists" | |
| else | |
| echo "Creating tag $TAG_NAME" | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| git tag -a "$TAG_NAME" -m "Release $TAG_NAME" | |
| git push origin "$TAG_NAME" | |
| fi | |
| - name: Create GitHub Release | |
| if: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.create_release == 'true') }} | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| prerelease: false | |
| generate_release_notes: true | |
| name: ${{ steps.info.outputs.version }} | |
| tag_name: ${{ steps.info.outputs.version }} | |
| target_commitish: ${{ github.sha }} | |
| append_body: | | |
| ### Windows Installation | |
| 1. Extract the zip over your Resonite folder | |
| 2. Launch Resonite.exe | |
| ### Linux Installation | |
| 1. Extract the zip over your Resonite folder | |
| 2. Change LinuxBootstrap.sh to launch `BepisLoader.dll` instead of `Renderite.Host.dll` | |
| (This needs to be re-done every time Resonite updates) | |
| 3. Launch Resonite | |
| files: | | |
| release/BepisLoader-full-windows.zip | |
| release/BepisLoader-full-linux.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |