Remove unused Unity package dependencies from manifest and lock files #7
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: Unity IL2CPP Build | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| name: Build (Unity ${{ matrix.unity }} / ${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - unity: "2019.4.28f1" | |
| target: "StandaloneWindows64" | |
| os: "windows-latest" | |
| - unity: "2019.4.28f1" | |
| target: "StandaloneLinux64" | |
| os: "ubuntu-latest" | |
| - unity: "2019.4.28f1" | |
| target: "Android" | |
| os: "ubuntu-latest" | |
| - unity: "2022.3.33f1" | |
| target: "StandaloneWindows64" | |
| os: "windows-latest" | |
| - unity: "2022.3.33f1" | |
| target: "StandaloneLinux64" | |
| os: "ubuntu-latest" | |
| - unity: "2022.3.33f1" | |
| target: "Android" | |
| os: "ubuntu-latest" | |
| - unity: "6000.0.65f1" | |
| target: "StandaloneWindows64" | |
| os: "windows-latest" | |
| - unity: "6000.0.65f1" | |
| target: "StandaloneLinux64" | |
| os: "ubuntu-latest" | |
| - unity: "6000.0.65f1" | |
| target: "Android" | |
| os: "ubuntu-latest" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # - name: Cache Library | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: Library | |
| # key: ${{ runner.os }}-unity-${{ matrix.unity }}-${{ matrix.target }}-library-${{ hashFiles('**/Packages/manifest.json') }} | |
| - name: Setup Unity | |
| uses: game-ci/unity-builder@v4 | |
| with: | |
| unityVersion: ${{ matrix.unity }} | |
| targetPlatform: ${{ matrix.target }} | |
| buildsPath: build | |
| gitPrivateToken: ${{ secrets.GITHUB_TOKEN }} | |
| env: | |
| UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
| # - name: Run Unity build | |
| # run: | | |
| # outdir="$GITHUB_WORKSPACE/build/${{ matrix.unity }}/${{ matrix.target }}" | |
| # # If a file named 'build' exists it blocks directory creation — remove it | |
| # mkdir -p "$outdir" | |
| # chmod -R u+rwX "$GITHUB_WORKSPACE/build" | |
| # # Replace `BuildScript.PerformBuild` with your project's build method. | |
| # /opt/unity/Editor/Unity -batchmode -nographics -quit -projectPath "$GITHUB_WORKSPACE" -buildTarget ${{ matrix.target }} -executeMethod BuildScript.PerformBuild -logFile "$outdir/build.log" || true | |
| - name: Archive build | |
| run: | | |
| outdir=build/${{ matrix.unity }}/${{ matrix.target }} | |
| zip -r "$outdir.zip" "$outdir" | |
| - name: Upload to GitHub Release | |
| if: github.event_name == 'release' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: build/${{ matrix.unity }}/${{ matrix.target }}.zip | |
| asset_name: build-${{ matrix.unity }}-${{ matrix.target }}.zip | |
| asset_content_type: application/zip | |
| - name: Upload build artifact | |
| if: github.event_name != 'release' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-${{ matrix.unity }}-${{ matrix.target }} | |
| path: build/${{ matrix.unity }}/${{ matrix.target }} |