81 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			YAML
		
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			YAML
		
	
	
| name: Builds - MacOS
 | |
| 
 | |
| on:
 | |
|   workflow_dispatch:
 | |
|   push:
 | |
|     branches:
 | |
|       - main
 | |
| 
 | |
| concurrency:
 | |
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
 | |
|   cancel-in-progress: true
 | |
| 
 | |
| jobs:
 | |
|   buildForAllPlatformsWindows:
 | |
|     name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
 | |
|     runs-on: macos-latest
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         projectPath:
 | |
|           - test-project
 | |
|         unityVersion:
 | |
|           - 2021.3.29f1
 | |
|           - 2022.1.24f1
 | |
|           - 2022.2.21f1
 | |
|           - 2022.3.7f1
 | |
|           - 2023.1.8f1
 | |
|         targetPlatform:
 | |
|           - StandaloneOSX # Build a MacOS executable
 | |
| 
 | |
|     steps:
 | |
|       ###########################
 | |
|       #         Checkout        #
 | |
|       ###########################
 | |
|       - uses: actions/checkout@v3
 | |
|         with:
 | |
|           lfs: true
 | |
| 
 | |
|       ###########################
 | |
|       #          Cache          #
 | |
|       ###########################
 | |
|       - uses: actions/cache@v3
 | |
|         with:
 | |
|           path: ${{ matrix.projectPath }}/Library
 | |
|           key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }}
 | |
|           restore-keys: |
 | |
|             Library-${{ matrix.projectPath }}-macos-
 | |
|             Library-            
 | |
| 
 | |
|       ###########################
 | |
|       #  Set Scripting Backend  #
 | |
|       ###########################
 | |
|       - name: Set Scripting Backend To il2cpp
 | |
|         run: |
 | |
|           mv -f "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" "./test-project/ProjectSettings/ProjectSettings.asset"          
 | |
| 
 | |
|       ###########################
 | |
|       #          Build          #
 | |
|       ###########################
 | |
|       - uses: ./
 | |
|         env:
 | |
|           UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
 | |
|           UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
 | |
|           UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
 | |
|         with:
 | |
|           projectPath: ${{ matrix.projectPath }}
 | |
|           unityVersion: ${{ matrix.unityVersion }}
 | |
|           targetPlatform: ${{ matrix.targetPlatform }}
 | |
|           customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
 | |
|           # We use dirty build because we are replacing the default project settings file above
 | |
|           allowDirtyBuild: true
 | |
| 
 | |
|       ###########################
 | |
|       #          Upload         #
 | |
|       ###########################
 | |
|       - uses: actions/upload-artifact@v3
 | |
|         with:
 | |
|           name: Build MacOS (${{ matrix.unityVersion }})
 | |
|           path: build
 | |
|           retention-days: 14
 |