1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-26 12:16:07 +01:00

break steps out a bit more

This commit is contained in:
Kyle Spearrin 2020-06-08 16:04:04 -04:00
parent 36efc0c877
commit fa6d2a3080
4 changed files with 37 additions and 46 deletions

View File

@ -3,7 +3,6 @@
$androidPath = $($rootPath + "\src\Android\Android.csproj");
$appPath = $($rootPath + "\src\App\App.csproj");
$appKeystoreFdroidFilename = "app_fdroid-keystore.jks";
$androidManifest = $($rootPath + "\src\Android\Properties\AndroidManifest.xml");
Write-Output "########################################"
@ -74,35 +73,3 @@ $appCenterNode=$xml.SelectSingleNode("/Project/ItemGroup/PackageReference[@Inclu
$appCenterNode.ParentNode.RemoveChild($appCenterNode);
$xml.Save($appPath);
Write-Output "########################################"
Write-Output "##### Restore NuGet"
Write-Output "########################################"
Invoke-Expression "& nuget restore"
# Build F-Droid Configuration
$buildScriptPath = $($rootPath + ".\.github\scripts\android\build.ps1");
Invoke-Expression "& `"$buildScriptPath`" -configuration FDroid"
Write-Output "########################################"
Write-Output "##### Sign FDroid Configuration"
Write-Output "########################################"
msbuild "$($androidPath)" "/t:SignAndroidPackage" "/p:Configuration=FDroid" "/p:AndroidKeyStore=true" `
"/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=$($env:FDROID_KEYSTORE_PASSWORD)" `
"/p:AndroidSigningKeyStore=$($appKeystoreFdroidFilename)" `
"/p:AndroidSigningStorePass=$($env:FDROID_KEYSTORE_PASSWORD)" "/v:quiet"
Write-Output "########################################"
Write-Output "##### Copy FDroid apk to project root"
Write-Output "########################################"
$signedApkPath = $($rootPath + "\src\Android\bin\FDroid\com.x8bit.bitwarden-Signed.apk");
$signedApkDestPath = $($rootPath + "\com.x8bit.bitwarden-fdroid.apk");
Copy-Item $signedApkPath $signedApkDestPath
Write-Output "########################################"
Write-Output "##### Done"
Write-Output "########################################"

23
.github/scripts/android/sign-fdroid.ps1 vendored Normal file
View File

@ -0,0 +1,23 @@
$rootPath = $env:GITHUB_WORKSPACE;
$androidPath = $($rootPath + "\src\Android\Android.csproj");
$appKeystoreFdroidFilename = "app_fdroid-keystore.jks";
Write-Output "########################################"
Write-Output "##### Sign FDroid Configuration"
Write-Output "########################################"
msbuild "$($androidPath)" "/t:SignAndroidPackage" "/p:Configuration=FDroid" "/p:AndroidKeyStore=true" `
"/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=$($env:FDROID_KEYSTORE_PASSWORD)" `
"/p:AndroidSigningKeyStore=$($appKeystoreFdroidFilename)" `
"/p:AndroidSigningStorePass=$($env:FDROID_KEYSTORE_PASSWORD)" "/v:quiet"
Write-Output "########################################"
Write-Output "##### Copy FDroid apk to project root"
Write-Output "########################################"
$signedApkPath = $($rootPath + "\src\Android\bin\FDroid\com.x8bit.bitwarden-Signed.apk");
$signedApkDestPath = $($rootPath + "\com.x8bit.bitwarden-fdroid.apk");
Copy-Item $signedApkPath $signedApkDestPath

View File

@ -5,12 +5,6 @@ $androidPath = $($rootPath + "\src\Android\Android.csproj");
$appKeystorePlayFilename = "app_play-keystore.jks";
$appKeystoreUploadFilename = "app_upload-keystore.jks";
Write-Output "########################################"
Write-Output "##### Build Release Configuration"
Write-Output "########################################"
msbuild "$($androidPath)" "/p:Configuration=Release"
Write-Output "########################################"
Write-Output "##### Sign Google Play Bundle Release Configuration"
Write-Output "########################################"
@ -46,7 +40,3 @@ $signedApkPath = $($rootPath + "\src\Android\bin\Release\com.x8bit.bitwarden-Sig
$signedApkDestPath = $($rootPath + "\com.x8bit.bitwarden.apk");
Copy-Item $signedApkPath $signedApkDestPath
Write-Output "########################################"
Write-Output "##### Done"
Write-Output "########################################"

View File

@ -43,7 +43,7 @@ jobs:
- name: Restore packages
run: nuget restore
- name: Build
- name: Build for Play Store
run: ./.github/scripts/android/build.ps1 -configuration Release
shell: pwsh
@ -69,9 +69,20 @@ jobs:
name: com.x8bit.bitwarden.apk
path: ./com.x8bit.bitwarden.apk
- name: Build and Sign for F-Droid Store
- name: Clean for F-Droid
run: ./.github/scripts/android/clean-fdroid.ps1
shell: pwsh
- name: Restore packages
run: nuget restore
- name: Build for F-Droid
run: ./.github/scripts/android/build.ps1 -configuration FDroid
shell: pwsh
- name: Sign for F-Droid
if: github.ref == 'refs/heads/master'
run: ./.github/scripts/android/build-sign-fdroid.ps1
run: ./.github/scripts/android/sign-fdroid.ps1
shell: pwsh
env:
FDROID_KEYSTORE_PASSWORD: ${{ secrets.FDROID_KEYSTORE_PASSWORD }}