Create android keystore on windows, output android version code
parent
2a32a9d870
commit
78f5a2ef1a
|
|
@ -188,6 +188,8 @@ outputs:
|
||||||
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
||||||
buildVersion:
|
buildVersion:
|
||||||
description: 'The generated version used for the Unity build'
|
description: 'The generated version used for the Unity build'
|
||||||
|
androidVersionCode:
|
||||||
|
description: 'The generated versionCode used for the Android Unity build'
|
||||||
branding:
|
branding:
|
||||||
icon: 'box'
|
icon: 'box'
|
||||||
color: 'gray-dark'
|
color: 'gray-dark'
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ function runMain() {
|
||||||
}
|
}
|
||||||
// Set output
|
// Set output
|
||||||
yield model_1.Output.setBuildVersion(buildParameters.buildVersion);
|
yield model_1.Output.setBuildVersion(buildParameters.buildVersion);
|
||||||
|
yield model_1.Output.setAndroidVersionCode(buildParameters.androidVersionCode);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|
@ -6657,6 +6658,11 @@ class Output {
|
||||||
yield core.setOutput('buildVersion', buildVersion);
|
yield core.setOutput('buildVersion', buildVersion);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
static setAndroidVersionCode(androidVersionCode) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
yield core.setOutput('androidVersionCode', androidVersionCode);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports["default"] = Output;
|
exports["default"] = Output;
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -66,6 +66,21 @@ else
|
||||||
Get-ChildItem -Path $Env:UNITY_PROJECT_PATH\Assets\Editor -Recurse
|
Get-ChildItem -Path $Env:UNITY_PROJECT_PATH\Assets\Editor -Recurse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create Android Keystore if available
|
||||||
|
#
|
||||||
|
|
||||||
|
if ( "$Env:BUILD_TARGET" -eq "Android" -and -not ([string]::IsNullOrEmpty("$Env:ANDROID_KEYSTORE_NAME")) -and -not ([string]::IsNullOrEmpty("$Env:ANDROID_KEYSTORE_BASE64")) )
|
||||||
|
{
|
||||||
|
Write-Output "Creating Android keystore."
|
||||||
|
$keystorePath = "$Env:GITHUB_WORKSPACE\$Env:ANDROID_KEYSTORE_NAME"
|
||||||
|
[System.IO.File]::WriteAllBytes($keystorePath, [System.Convert]::FromBase64String($Env:ANDROID_KEYSTORE_BASE64))
|
||||||
|
Write-Output "Created Android keystore."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Output "Not creating Android keystore."
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Pre-build debug information
|
# Pre-build debug information
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ async function runMain() {
|
||||||
|
|
||||||
// Set output
|
// Set output
|
||||||
await Output.setBuildVersion(buildParameters.buildVersion);
|
await Output.setBuildVersion(buildParameters.buildVersion);
|
||||||
|
await Output.setAndroidVersionCode(buildParameters.androidVersionCode);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed((error as Error).message);
|
core.setFailed((error as Error).message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,10 @@ class Output {
|
||||||
static async setBuildVersion(buildVersion) {
|
static async setBuildVersion(buildVersion) {
|
||||||
await core.setOutput('buildVersion', buildVersion);
|
await core.setOutput('buildVersion', buildVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async setAndroidVersionCode(androidVersionCode) {
|
||||||
|
await core.setOutput('androidVersionCode', androidVersionCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Output;
|
export default Output;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue