mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 07:05:35 +03:00
DEVOPS-1866 - Fix F-Droid Signing (#3063)
This commit is contained in:
parent
3f463647a0
commit
e3441845cd
1 changed files with 15 additions and 17 deletions
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
|
@ -298,7 +298,8 @@ jobs:
|
||||||
name: F-Droid Build
|
name: F-Droid Build
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
env:
|
env:
|
||||||
android_folder_path: src/App/Platforms/Android
|
android_folder_path: src\App\Platforms\Android
|
||||||
|
android_folder_path_bash: src/App/Platforms/Android
|
||||||
android_manifest_path: src/App/Platforms/Android/AndroidManifest.xml
|
android_manifest_path: src/App/Platforms/Android/AndroidManifest.xml
|
||||||
steps:
|
steps:
|
||||||
- name: Setup NuGet
|
- name: Setup NuGet
|
||||||
|
@ -350,9 +351,8 @@ jobs:
|
||||||
CONTAINER_NAME: mobile
|
CONTAINER_NAME: mobile
|
||||||
FILE: app_fdroid-keystore.jks
|
FILE: app_fdroid-keystore.jks
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/secrets
|
|
||||||
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME --name $FILE \
|
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME --name $FILE \
|
||||||
--file $HOME/secrets/$FILE --output none
|
--file ${{ env.android_folder_path_bash }}/$FILE --output none
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Increment version
|
- name: Increment version
|
||||||
|
@ -389,30 +389,28 @@ jobs:
|
||||||
- name: Restore packages
|
- name: Restore packages
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Build for F-Droid
|
- name: Build & Sign F-Droid
|
||||||
run: |
|
|
||||||
$configuration = "Release";
|
|
||||||
$projToBuild = $($env:GITHUB_WORKSPACE + "/${{ env.main_app_project_path }}");
|
|
||||||
|
|
||||||
Write-Output "##### Build $configuration FDROID"
|
|
||||||
|
|
||||||
dotnet build $projToBuild -c $configuration -f ${{ env.target-net-version }}-android /p:CustomConstants="FDROID"
|
|
||||||
|
|
||||||
- name: Sign for F-Droid
|
|
||||||
env:
|
env:
|
||||||
FDROID_KEYSTORE_PASSWORD: ${{ secrets.FDROID_KEYSTORE_PASSWORD }}
|
FDROID_KEYSTORE_PASSWORD: ${{ secrets.FDROID_KEYSTORE_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
$projToBuild = $($env:GITHUB_WORKSPACE + "/${{ env.main_app_project_path }}");
|
$projToBuild = "$($env:GITHUB_WORKSPACE)\${{ env.main_app_project_path }}";
|
||||||
$packageName = "com.x8bit.bitwarden";
|
$packageName = "com.x8bit.bitwarden";
|
||||||
|
|
||||||
Write-Output "##### Sign FDroid"
|
Write-Output "##### Sign FDroid"
|
||||||
|
|
||||||
dotnet publish $projToBuild -c Release -f ${{ env.target-net-version }}-android /p:AndroidKeyStore=true /p:AndroidSigningKeyStore=$("app_fdroid-keystore.jks") /p:AndroidSigningKeyAlias=bitwarden /p:AndroidSigningKeyPass="$($env:FDROID_KEYSTORE_PASSWORD)" /p:AndroidSigningStorePass="$($env:FDROID_KEYSTORE_PASSWORD)" /p:CustomConstants="FDROID" --no-restore
|
$signingFdroidKeyStore = "$($env:GITHUB_WORKSPACE)\${{ env.android_folder_path }}\app_fdroid-keystore.jks"
|
||||||
|
dotnet publish $projToBuild -c Release -f ${{ env.target-net-version }}-android `
|
||||||
|
/p:AndroidKeyStore=true `
|
||||||
|
/p:AndroidSigningKeyStore=$signingFdroidKeyStore `
|
||||||
|
/p:AndroidSigningKeyAlias=bitwarden `
|
||||||
|
/p:AndroidSigningKeyPass="$($env:FDROID_KEYSTORE_PASSWORD)" `
|
||||||
|
/p:AndroidSigningStorePass="$($env:FDROID_KEYSTORE_PASSWORD)" `
|
||||||
|
/p:CustomConstants="FDROID" --no-restore
|
||||||
|
|
||||||
Write-Output "##### Copy FDroid apk to project root"
|
Write-Output "##### Copy FDroid apk to project root"
|
||||||
|
|
||||||
$signedApkPath = $($env:GITHUB_WORKSPACE + "/${{ env.main_app_folder_path }}/bin/Release/${{ env.target-net-version }}-android/publish/$($packageName)-Signed.apk");
|
$signedApkPath = "$($env:GITHUB_WORKSPACE)\${{ env.main_app_folder_path }}\bin\Release\${{ env.target-net-version }}-android\publish\$($packageName)-Signed.apk";
|
||||||
$signedApkDestPath = $($env:GITHUB_WORKSPACE + "/com.x8bit.bitwarden-fdroid.apk");
|
$signedApkDestPath = "$($env:GITHUB_WORKSPACE)\com.x8bit.bitwarden-fdroid.apk";
|
||||||
|
|
||||||
Copy-Item $signedApkPath $signedApkDestPath
|
Copy-Item $signedApkPath $signedApkDestPath
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue