Create EffectCategoryProviderSO.cs #15
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: Build — Android & Windows | |
| on: | |
| push: | |
| branches: [master, deploy] | |
| workflow_dispatch: | |
| inputs: | |
| platform: | |
| description: 'Target platform' | |
| required: true | |
| default: 'Both' | |
| type: choice | |
| options: [Android, Windows, Both] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| plan: | |
| name: Plan | |
| runs-on: ubuntu-latest | |
| outputs: | |
| build_android: ${{ steps.flags.outputs.build_android }} | |
| build_windows: ${{ steps.flags.outputs.build_windows }} | |
| any_build: ${{ steps.flags.outputs.any_build }} | |
| steps: | |
| - name: Parse flags | |
| id: flags | |
| run: | | |
| MSG="${{ github.event.head_commit.message }}" | |
| TRIGGER="${{ github.event_name }}" | |
| SELECTED="${{ github.event.inputs.platform }}" | |
| android=false; windows=false | |
| if [ "$TRIGGER" = "workflow_dispatch" ]; then | |
| case "$SELECTED" in | |
| Android) android=true ;; | |
| Windows) windows=true ;; | |
| Both) android=true; windows=true ;; | |
| esac | |
| else | |
| # --build alone (word-boundary) triggers everything | |
| if echo "$MSG" | grep -qE '(^|[[:space:]])--build([[:space:]]|$)'; then | |
| android=true; windows=true | |
| fi | |
| echo "$MSG" | grep -qi -- '--build-android' && android=true | |
| echo "$MSG" | grep -qi -- '--build-windows' && windows=true | |
| fi | |
| any=false | |
| { [ "$android" = "true" ] || [ "$windows" = "true" ]; } && any=true | |
| echo "build_android=$android" >> $GITHUB_OUTPUT | |
| echo "build_windows=$windows" >> $GITHUB_OUTPUT | |
| echo "any_build=$any" >> $GITHUB_OUTPUT | |
| echo "📋 Plan → Android: $android | Windows: $windows" | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| build: | |
| name: Build — ${{ matrix.targetPlatform }} | |
| runs-on: ubuntu-latest | |
| needs: plan | |
| if: needs.plan.outputs.any_build == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - targetPlatform: Android | |
| plan_key: build_android | |
| - targetPlatform: StandaloneWindows64 | |
| plan_key: build_windows | |
| steps: | |
| - name: Gate | |
| id: gate | |
| run: | | |
| case "${{ matrix.plan_key }}" in | |
| build_android) VAL="${{ needs.plan.outputs.build_android }}" ;; | |
| build_windows) VAL="${{ needs.plan.outputs.build_windows }}" ;; | |
| esac | |
| echo "should_build=$VAL" >> $GITHUB_OUTPUT | |
| [ "$VAL" = "true" ] \ | |
| && echo "✅ Building ${{ matrix.targetPlatform }}" \ | |
| || echo "⏭️ Skipping ${{ matrix.targetPlatform }}" | |
| - name: Free Disk Space | |
| if: steps.gate.outputs.should_build == 'true' | |
| run: | | |
| sudo apt-get remove -y '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*' \ | |
| '^mysql-.*' azure-cli google-chrome-stable firefox powershell \ | |
| mono-devel libgl1-mesa-dri || true | |
| sudo apt-get autoremove -y && sudo apt-get clean | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android \ | |
| /opt/ghc /usr/local/share/boost "$AGENT_TOOLSDIRECTORY" | |
| docker system prune -a -f || true | |
| sudo swapoff -a || true && sudo rm -f /swapfile | |
| echo "📊 Disk after cleanup:"; df -h / | |
| - name: Checkout | |
| if: steps.gate.outputs.should_build == 'true' | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Cache Library | |
| if: steps.gate.outputs.should_build == 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: PackageSandbox/Library | |
| key: Library-${{ matrix.targetPlatform }}-${{ hashFiles('PackageSandbox/Assets/**', 'PackageSandbox/Packages/**', 'PackageSandbox/ProjectSettings/**') }} | |
| restore-keys: | | |
| Library-${{ matrix.targetPlatform }}- | |
| Library- | |
| - name: Build — ${{ matrix.targetPlatform }} | |
| if: steps.gate.outputs.should_build == 'true' | |
| uses: game-ci/unity-builder@v4 | |
| env: | |
| UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
| with: | |
| # Point at PackageSandbox which is the actual Unity project | |
| projectPath: PackageSandbox | |
| targetPlatform: ${{ matrix.targetPlatform }} | |
| unityVersion: 2022.3.13f1 | |
| buildName: PackageSandbox | |
| customParameters: -disable-assembly-updater | |
| - name: Upload | |
| if: steps.gate.outputs.should_build == 'true' && success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: PackageSandbox-${{ matrix.targetPlatform }}-${{ github.run_number }} | |
| path: build/${{ matrix.targetPlatform }} | |
| retention-days: 14 | |
| - name: Skipped | |
| if: steps.gate.outputs.should_build == 'false' | |
| run: echo "⏭️ ${{ matrix.targetPlatform }} not requested." | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| no-build: | |
| name: No build requested | |
| runs-on: ubuntu-latest | |
| needs: plan | |
| if: needs.plan.outputs.any_build == 'false' | |
| steps: | |
| - run: | | |
| echo "ℹ️ No build requested." | |
| echo " Push with --build, --build-android, or --build-windows in commit message," | |
| echo " or trigger manually via Actions → Run workflow." |