231 lines
		
	
	
		
			8.9 KiB
		
	
	
	
		
			YAML
		
	
	
			
		
		
	
	
			231 lines
		
	
	
		
			8.9 KiB
		
	
	
	
		
			YAML
		
	
	
| name: 'Unity - Builder'
 | |
| author: Webber Takken <webber@takken.io>
 | |
| description: 'Build Unity projects for different platforms.'
 | |
| inputs:
 | |
|   targetPlatform:
 | |
|     required: true
 | |
|     default: ''
 | |
|     description: 'Platform that the build should target.'
 | |
|   unityVersion:
 | |
|     required: false
 | |
|     default: 'auto'
 | |
|     description: 'Version of unity to use for building the project. Use "auto" to get from your ProjectSettings/ProjectVersion.txt'
 | |
|   customImage:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Specific docker image that should be used for building the project'
 | |
|   projectPath:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Relative path to the project to be built.'
 | |
|   buildName:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Name of the build.'
 | |
|   buildsPath:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Path where the builds should be stored.'
 | |
|   buildMethod:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.'
 | |
|   customParameters:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Custom parameters to configure the build.'
 | |
|   versioning:
 | |
|     required: false
 | |
|     default: 'Semantic'
 | |
|     description: 'The versioning scheme to use when building the project'
 | |
|   version:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'The version, when used with the "Custom" versioning scheme'
 | |
|   androidVersionCode:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'The android versionCode'
 | |
|   androidAppBundle:
 | |
|     required: false
 | |
|     default: 'false'
 | |
|     description: 'Whether to build .aab instead of .apk'
 | |
|   androidKeystoreName:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'The android keystoreName'
 | |
|   androidKeystoreBase64:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'The base64 contents of the android keystore file'
 | |
|   androidKeystorePass:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'The android keystorePass'
 | |
|   androidKeyaliasName:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'The android keyaliasName'
 | |
|   androidKeyaliasPass:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'The android keyaliasPass'
 | |
|   androidTargetSdkVersion:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'The android target API level.'
 | |
|   sshAgent:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'SSH Agent path to forward to the container'
 | |
|   gitPrivateToken:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Github private token to pull from github'
 | |
|   chownFilesTo:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'User and optionally group (user or user:group or uid:gid) to give ownership of the resulting build artifacts'
 | |
|   allowDirtyBuild:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Allows the branch of the build to be dirty, and still generate the build.'
 | |
|   postBuildSteps:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'run a post build job in yaml format with the keys image, secrets (name, value object array), command string'
 | |
|   preBuildSteps:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Run a pre build job after the repository setup but before the build job (in yaml format with the keys image, secrets (name, value object array), command line string)'
 | |
|   customJobHooks:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Specify custom commands and trigger hooks (injects commands into jobs)'
 | |
|   customJob:
 | |
|     required: false
 | |
|     default: ''
 | |
|     description: 'Run a custom job instead of the standard build automation for cloud runner (in yaml format with the keys image, secrets (name, value object array), command line string)'
 | |
|   awsBaseStackName:
 | |
|     default: 'game-ci'
 | |
|     required: false
 | |
|     description: 'The Cloud Formation stack name that must be setup before using this option.'
 | |
|   cloudRunnerCluster:
 | |
|     default: 'local'
 | |
|     required: false
 | |
|     description: 'Either local, k8s or aws can be used to run builds on a remote cluster. Additional parameters must be configured.'
 | |
|   cloudRunnerCpu:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Amount of CPU time to assign the remote build container'
 | |
|   cloudRunnerMemory:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Amount of memory to assign the remote build container'
 | |
|   cachePushOverrideCommand:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'A command run every time a file is pushed to cache, formatted with input file path and remote cache path'
 | |
|   cachePullOverrideCommand:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'A command run every time before a file is being pulled from cache, formatted with request cache file and destination path'
 | |
|   readInputFromOverrideList:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Comma separated list of input value names to read from "input override command"'
 | |
|   readInputOverrideCommand:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Extend game ci by specifying a command to execute to pull input from external source e.g cloud provider secret managers'
 | |
|   kubeConfig:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Supply a base64 encoded kubernetes config to run builds on kubernetes and stream logs until completion.'
 | |
|   kubeVolume:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Supply a Persistent Volume Claim name to use for the Unity build.'
 | |
|   kubeStorageClass:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Kubernetes storage class to use for cloud runner jobs, leave empty to install rook cluster.'
 | |
|   kubeVolumeSize:
 | |
|     default: '5Gi'
 | |
|     required: false
 | |
|     description: 'Amount of disc space to assign the Kubernetes Persistent Volume'
 | |
|   cacheKey:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Cache key to indicate bucket for cache'
 | |
|   checkDependencyHealthOverride:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Use to specify a way to check depdency services health to enable resilient self-starting jobs'
 | |
|   startDependenciesOverride:
 | |
|     default: ''
 | |
|     required: false
 | |
|     description: 'Use to specify a way to start depdency services health to enable resilient self-starting jobs'
 | |
| outputs:
 | |
|   volume:
 | |
|     description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
 | |
|     value: ''
 | |
|   buildVersion:
 | |
|     description: 'The generated version used for the Unity build'
 | |
|     value: ''
 | |
| runs:
 | |
|   using: 'composite'
 | |
|   steps:
 | |
|     - run: echo "Using GameCI CLI to build project"
 | |
|       shell: bash
 | |
|     - uses: denoland/setup-deno@v1
 | |
|       with:
 | |
|         deno-version: v1.x
 | |
|     - run: |
 | |
|         deno run --allow-run ./src/index.ts build \
 | |
|         --targetPlatform="${{ inputs.targetPlatform }}" \
 | |
|         --unityVersion="${{ inputs.unityVersion }}" \
 | |
|         --customImage="${{ inputs.customImage }}" \
 | |
|         --projectPath="${{ inputs.projectPath }}" \
 | |
|         --buildName="${{ inputs.buildName }}" \
 | |
|         --buildsPath="${{ inputs.buildsPath }}" \
 | |
|         --buildMethod="${{ inputs.buildMethod }}" \
 | |
|         --customParameters="${{ inputs.customParameters }}" \
 | |
|         --versioning="${{ inputs.versioning }}" \
 | |
|         --version="${{ inputs.version }}" \
 | |
|         --androidVersionCode="${{ inputs.androidVersionCode }}" \
 | |
|         --androidAppBundle="${{ inputs.androidAppBundle }}" \
 | |
|         --androidKeystoreName="${{ inputs.androidKeystoreName }}" \
 | |
|         --androidKeystoreBase64="${{ inputs.androidKeystoreBase64 }}" \
 | |
|         --androidKeystorePass="${{ inputs.androidKeystorePass }}" \
 | |
|         --androidKeyaliasName="${{ inputs.androidKeyaliasName }}" \
 | |
|         --androidKeyaliasPass="${{ inputs.androidKeyaliasPass }}" \
 | |
|         --androidTargetSdkVersion="${{ inputs.androidTargetSdkVersion }}" \
 | |
|         --sshAgent="${{ inputs.sshAgent }}" \
 | |
|         --gitPrivateToken="${{ inputs.gitPrivateToken }}" \
 | |
|         --chownFilesTo="${{ inputs.chownFilesTo }}" \
 | |
|         --allowDirtyBuild="${{ inputs.allowDirtyBuild }}" \
 | |
|         --postBuildSteps="${{ inputs.postBuildSteps }}" \
 | |
|         --preBuildSteps="${{ inputs.preBuildSteps }}" \
 | |
|         --customJobHooks="${{ inputs.customJobHooks }}" \
 | |
|         --customJob="${{ inputs.customJob }}" \
 | |
|         --awsBaseStackName="${{ inputs.awsBaseStackName }}" \
 | |
|         --cloudRunnerCluster="${{ inputs.cloudRunnerCluster }}" \
 | |
|         --cloudRunnerCpu="${{ inputs.cloudRunnerCpu }}" \
 | |
|         --cloudRunnerMemory="${{ inputs.cloudRunnerMemory }}" \
 | |
|         --cachePushOverrideCommand="${{ inputs.cachePushOverrideCommand }}" \
 | |
|         --cachePullOverrideCommand="${{ inputs.cachePullOverrideCommand }}" \
 | |
|         --readInputFromOverrideList="${{ inputs.readInputFromOverrideList }}" \
 | |
|         --readInputOverrideCommand="${{ inputs.readInputOverrideCommand }}" \
 | |
|         --kubeConfig="${{ inputs.kubeConfig }}" \
 | |
|         --kubeVolume="${{ inputs.kubeVolume }}" \
 | |
|         --kubeStorageClass="${{ inputs.kubeStorageClass }}" \
 | |
|         --kubeVolumeSize="${{ inputs.kubeVolumeSize }}" \
 | |
|         --cacheKey="${{ inputs.cacheKey }}" \
 | |
|         --checkDependencyHealthOverride="${{ inputs.checkDependencyHealthOverride }}" \
 | |
|         --startDependenciesOverride="${{ inputs.startDependenciesOverride }}"        
 | |
|       shell: bash
 | |
| branding:
 | |
|   icon: 'box'
 | |
|   color: 'gray-dark'
 |