name: Unity-Cross-Platform-Build on: [push] jobs: build: name: Build for ${{ matrix.targetPlatform }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: targetPlatform: - StandaloneWindows64 # 윈도우용 - StandaloneOSX # 맥용 steps: - name: Checkout code uses: actions/checkout@v4 - name: Build Project (The Last Strike) run: | # 1. 작업장 권한 강제 부여 (Check) sudo chmod -R 777 . # 2. 생 도커로 빌드 (파일 경로 꼬임 원천 차단) (Check) docker run --rm \ -v $(pwd):/project \ -e UNITY_LICENSE="${{ secrets.UNITY_LICENSE }}" \ -e UNITY_EMAIL="${{ secrets.UNITY_EMAIL }}" \ -e UNITY_PASSWORD="${{ secrets.UNITY_PASSWORD }}" \ unityci/editor:ubuntu-6000.2.15f1-windows-mono-3 \ /bin/bash -c "unity-editor -batchmode -quit -projectPath /project -buildTarget StandaloneWindows64 -buildWindows64Player /project/build/StandaloneWindows64/MyGame.exe" - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: Build-${{ matrix.targetPlatform }} path: build/${{ matrix.targetPlatform }}