From 7f14ec9b5d711b2f5098fa455ce08bcd7f8a3bb9 Mon Sep 17 00:00:00 2001 From: ifernandezdiaz Date: Wed, 6 Sep 2023 14:25:59 -0300 Subject: [PATCH] QA-508 - Build app for automation CI (#2705) * Adding build steps for .app * Uploading .app artifact * Fixing ARCHIVE_PATH variable * Fixing missing OutputPath * Fixing Bitwarden .app file name * Fixing wrong .app location * Adding Fede's suggestion * Update .github/workflows/build.yml Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> --------- Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ src/iOS.Core/iOS.Core.csproj | 11 +++++++++++ 2 files changed, 43 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 114b5346a..202395839 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -667,6 +667,22 @@ jobs: $configuration = "AppStore"; $platform = "iPhone"; + Write-Output "########################################" + Write-Output "##### Archive $configuration Configuration for $platform Platform" + Write-Output "########################################" + msbuild "$($env:GITHUB_WORKSPACE + "/src/iOS/iOS.csproj")" "/p:Platform=$platform" ` + "/p:Configuration=$configuration" "/p:ArchiveOnBuild=true" "/t:`"Build`"" + + Write-Output "########################################" + Write-Output "##### Done" + Write-Output "########################################" + shell: pwsh + + - name: Archive Build for Mobile Automation + run: | + $configuration = "Release"; + $platform = "iPhoneSimulator"; + Write-Output "########################################" Write-Output "##### Archive $configuration Configuration for $platform Platform" Write-Output "########################################" @@ -689,6 +705,15 @@ jobs: -exportOptionsPlist $EXPORT_OPTIONS_PATH shell: bash + - name: Export .app for Automation CI + run: | + ARCHIVE_PATH="./src/iOS/bin/iPhoneSimulator/Release/BitwardeniOS.app" + EXPORT_PATH="./bitwarden-export" + + zip -r -q BitwardeniOS.app.zip $ARCHIVE_PATH + mv BitwardeniOS.app.zip $EXPORT_PATH + shell: bash + - name: Copy all dSYMs files to upload run: | ARCHIVE_DSYMS_PATH="$HOME/Library/Developer/Xcode/Archives/*/*.xcarchive/dSYMs" @@ -711,6 +736,13 @@ jobs: ./bitwarden-export/dSYMs/*.* if-no-files-found: error + - name: Upload .app file for Automation CI + uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0 + with: + name: BitwardeniOS.app.zip + path: ./bitwarden-export/BitwardeniOS.app.zip + if-no-files-found: error + - name: Install AppCenter CLI if: | (github.ref == 'refs/heads/master' diff --git a/src/iOS.Core/iOS.Core.csproj b/src/iOS.Core/iOS.Core.csproj index f52468e43..3d5a3e208 100644 --- a/src/iOS.Core/iOS.Core.csproj +++ b/src/iOS.Core/iOS.Core.csproj @@ -53,6 +53,17 @@ 4 false + + bin\iPhoneSimulator\Release\ + __IOS__;__MOBILE__;__UNIFIED__; + true + ;VSX1000 + full + AnyCPU + false + prompt + MinimumRecommendedRules.ruleset + bin\FDroid\ __IOS__;__MOBILE__;__UNIFIED__;