2020-06-08 18:14:10 +02:00
|
|
|
|
$rootPath = $env:GITHUB_WORKSPACE;
|
|
|
|
|
|
2020-06-09 17:52:23 +02:00
|
|
|
|
$androidPath = $($rootPath + "/src/Android/Android.csproj");
|
2020-06-08 18:14:10 +02:00
|
|
|
|
|
|
|
|
|
$appKeystorePlayFilename = "app_play-keystore.jks";
|
|
|
|
|
$appKeystoreUploadFilename = "app_upload-keystore.jks";
|
|
|
|
|
|
|
|
|
|
Write-Output "########################################"
|
|
|
|
|
Write-Output "##### Sign Google Play Bundle Release Configuration"
|
|
|
|
|
Write-Output "########################################"
|
|
|
|
|
|
|
|
|
|
msbuild "$($androidPath)" "/t:SignAndroidPackage" "/p:Configuration=Release" "/p:AndroidKeyStore=true" `
|
|
|
|
|
"/p:AndroidSigningKeyAlias=upload" "/p:AndroidSigningKeyPass=$($env:UPLOAD_KEYSTORE_PASSWORD)" `
|
|
|
|
|
"/p:AndroidSigningKeyStore=$($appKeystoreUploadFilename)" `
|
|
|
|
|
"/p:AndroidSigningStorePass=$($env:UPLOAD_KEYSTORE_PASSWORD)" "/p:AndroidPackageFormat=aab" "/v:quiet"
|
|
|
|
|
|
|
|
|
|
Write-Output "########################################"
|
|
|
|
|
Write-Output "##### Copy Google Play Bundle to project root"
|
|
|
|
|
Write-Output "########################################"
|
|
|
|
|
|
2020-06-09 17:52:23 +02:00
|
|
|
|
$signedAabPath = $($rootPath + "/src/Android/bin/Release/com.x8bit.bitwarden-Signed.aab");
|
|
|
|
|
$signedAabDestPath = $($rootPath + "/com.x8bit.bitwarden.aab");
|
2020-06-08 18:14:10 +02:00
|
|
|
|
|
|
|
|
|
Copy-Item $signedAabPath $signedAabDestPath
|
|
|
|
|
|
|
|
|
|
Write-Output "########################################"
|
|
|
|
|
Write-Output "##### Sign APK Release Configuration"
|
|
|
|
|
Write-Output "########################################"
|
|
|
|
|
|
|
|
|
|
msbuild "$($androidPath)" "/t:SignAndroidPackage" "/p:Configuration=Release" "/p:AndroidKeyStore=true" `
|
|
|
|
|
"/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=$($env:PLAY_KEYSTORE_PASSWORD)" `
|
|
|
|
|
"/p:AndroidSigningKeyStore=$($appKeystorePlayFilename)" `
|
|
|
|
|
"/p:AndroidSigningStorePass=$($env:PLAY_KEYSTORE_PASSWORD)" "/v:quiet"
|
|
|
|
|
|
|
|
|
|
Write-Output "########################################"
|
|
|
|
|
Write-Output "##### Copy Release APK to project root"
|
|
|
|
|
Write-Output "########################################"
|
|
|
|
|
|
2020-06-09 17:52:23 +02:00
|
|
|
|
$signedApkPath = $($rootPath + "/src/Android/bin/Release/com.x8bit.bitwarden-Signed.apk");
|
|
|
|
|
$signedApkDestPath = $($rootPath + "/com.x8bit.bitwarden.apk");
|
2020-06-08 18:14:10 +02:00
|
|
|
|
|
|
|
|
|
Copy-Item $signedApkPath $signedApkDestPath
|