PM-3350 build.yml updated iOS build and ignore Android build to try the CI faster

This commit is contained in:
Federico Maccaroni 2023-11-23 17:20:17 -03:00
parent 04e409f3c6
commit 9ffdfd51cc
No known key found for this signature in database
GPG key ID: 5D233F8F2B034536

View file

@ -64,6 +64,7 @@ jobs:
android: android:
name: Android name: Android
if: github.ref == 'refs/heads/master'
runs-on: windows-2022 runs-on: windows-2022
needs: setup needs: setup
strategy: strategy:
@ -489,299 +490,305 @@ jobs:
# if-no-files-found: error # if-no-files-found: error
# ios: ios:
# name: Apple iOS name: Apple iOS
# runs-on: macos-12 runs-on: macos-12
# needs: setup needs: setup
# steps: env:
# - name: Setup NuGet ios_folder_path: src/App/Platforms/iOS
# uses: nuget/setup-nuget@296fd3ccf8528660c91106efefe2364482f86d6f # v1.2.0 app_output_name: App
# with: steps:
# nuget-version: 5.9.0 - name: Setup NuGet
uses: nuget/setup-nuget@296fd3ccf8528660c91106efefe2364482f86d6f # v1.2.0
with:
nuget-version: 6.4.0
- name: Set up .NET
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
with:
dotnet-version: '8.0.x'
# This step might be obsolete at some point as .NET MAUI workloads
# are starting to come pre-installed on the GH Actions build agents.
- name: Install MAUI Workload
run: dotnet workload install maui --ignore-failed-sources
# - name: Print environment - name: Print environment
# run: | run: |
# nuget help | grep Version nuget help | grep Version
# msbuild -version dotnet --info
# dotnet --info echo "GitHub ref: $GITHUB_REF"
# echo "GitHub ref: $GITHUB_REF" echo "GitHub event: $GITHUB_EVENT"
# echo "GitHub event: $GITHUB_EVENT"
# - name: Checkout repo - name: Checkout repo
# uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
# with: with:
# submodules: 'true' submodules: 'true'
# - name: Login to Azure - CI Subscription - name: Login to Azure - CI Subscription
# uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6 uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6
# with: with:
# creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
# - name: Retrieve secrets - name: Retrieve secrets
# id: retrieve-secrets id: retrieve-secrets
# env: env:
# KEYVAULT: bitwarden-ci KEYVAULT: bitwarden-ci
# SECRETS: | SECRETS: |
# appcenter-ios-token appcenter-ios-token
# run: | run: |
# for i in ${SECRETS//,/ } for i in ${SECRETS//,/ }
# do do
# VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $i --query value --output tsv) VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $i --query value --output tsv)
# echo "::add-mask::$VALUE" echo "::add-mask::$VALUE"
# echo "$i=$VALUE" >> $GITHUB_OUTPUT echo "$i=$VALUE" >> $GITHUB_OUTPUT
# done done
# - name: Decrypt secrets - name: Decrypt secrets
# env: env:
# DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }} DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
# run: | run: |
# mkdir -p ~/secrets mkdir -p ~/secrets
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output $HOME/secrets/bitwarden-mobile-key.p12 ./.github/secrets/bitwarden-mobile-key.p12.gpg --output $HOME/secrets/bitwarden-mobile-key.p12 ./.github/secrets/bitwarden-mobile-key.p12.gpg
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output $HOME/secrets/iphone-distribution-cert.p12 ./.github/secrets/iphone-distribution-cert.p12.gpg --output $HOME/secrets/iphone-distribution-cert.p12 ./.github/secrets/iphone-distribution-cert.p12.gpg
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output $HOME/secrets/dist_autofill.mobileprovision ./.github/secrets/dist_autofill.mobileprovision.gpg --output $HOME/secrets/dist_autofill.mobileprovision ./.github/secrets/dist_autofill.mobileprovision.gpg
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output $HOME/secrets/dist_bitwarden.mobileprovision ./.github/secrets/dist_bitwarden.mobileprovision.gpg --output $HOME/secrets/dist_bitwarden.mobileprovision ./.github/secrets/dist_bitwarden.mobileprovision.gpg
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output $HOME/secrets/dist_extension.mobileprovision ./.github/secrets/dist_extension.mobileprovision.gpg --output $HOME/secrets/dist_extension.mobileprovision ./.github/secrets/dist_extension.mobileprovision.gpg
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output $HOME/secrets/dist_share_extension.mobileprovision \ --output $HOME/secrets/dist_share_extension.mobileprovision \
# ./.github/secrets/dist_share_extension.mobileprovision.gpg ./.github/secrets/dist_share_extension.mobileprovision.gpg
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output $HOME/secrets/dist_watch_app.mobileprovision \ --output $HOME/secrets/dist_watch_app.mobileprovision \
# ./.github/secrets/dist_watch_app.mobileprovision.gpg ./.github/secrets/dist_watch_app.mobileprovision.gpg
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output $HOME/secrets/dist_watch_app_extension.mobileprovision \ --output $HOME/secrets/dist_watch_app_extension.mobileprovision \
# ./.github/secrets/dist_watch_app_extension.mobileprovision.gpg ./.github/secrets/dist_watch_app_extension.mobileprovision.gpg
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# --output ./src/watchOS/bitwarden/GoogleService-Info.plist ./.github/secrets/GoogleService-Info.plist.gpg --output ./src/watchOS/bitwarden/GoogleService-Info.plist ./.github/secrets/GoogleService-Info.plist.gpg
# shell: bash shell: bash
# - name: Increment version - name: Increment version
# run: | run: |
# BUILD_NUMBER=$((100 + $GITHUB_RUN_NUMBER)) BUILD_NUMBER=$((100 + $GITHUB_RUN_NUMBER))
# echo "########################################" echo "########################################"
# echo "##### Setting CFBundleVersion $BUILD_NUMBER" echo "##### Setting CFBundleVersion $BUILD_NUMBER"
# echo "########################################" echo "########################################"
# perl -0777 -pi.bak -e 's/<key>CFBundleVersion<\/key>\s*<string>1<\/string>/<key>CFBundleVersion<\/key>\n\t<string>'"$BUILD_NUMBER"'<\/string>/' ./src/iOS/Info.plist perl -0777 -pi.bak -e 's/<key>CFBundleVersion<\/key>\s*<string>1<\/string>/<key>CFBundleVersion<\/key>\n\t<string>'"$BUILD_NUMBER"'<\/string>/' ./${{ env.ios_folder_path }}/Info.plist
# perl -0777 -pi.bak -e 's/<key>CFBundleVersion<\/key>\s*<string>1<\/string>/<key>CFBundleVersion<\/key>\n\t<string>'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.Extension/Info.plist perl -0777 -pi.bak -e 's/<key>CFBundleVersion<\/key>\s*<string>1<\/string>/<key>CFBundleVersion<\/key>\n\t<string>'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.Extension/Info.plist
# perl -0777 -pi.bak -e 's/<key>CFBundleVersion<\/key>\s*<string>1<\/string>/<key>CFBundleVersion<\/key>\n\t<string>'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.Autofill/Info.plist perl -0777 -pi.bak -e 's/<key>CFBundleVersion<\/key>\s*<string>1<\/string>/<key>CFBundleVersion<\/key>\n\t<string>'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.Autofill/Info.plist
# perl -0777 -pi.bak -e 's/<key>CFBundleVersion<\/key>\s*<string>1<\/string>/<key>CFBundleVersion<\/key>\n\t<string>'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.ShareExtension/Info.plist perl -0777 -pi.bak -e 's/<key>CFBundleVersion<\/key>\s*<string>1<\/string>/<key>CFBundleVersion<\/key>\n\t<string>'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.ShareExtension/Info.plist
# cd src/watchOS/bitwarden cd src/watchOS/bitwarden
# agvtool new-version -all $BUILD_NUMBER agvtool new-version -all $BUILD_NUMBER
# cd ../../.. cd ../../..
# shell: bash shell: bash
# - name: Update Entitlements - name: Update Entitlements
# run: | run: |
# echo "########################################" echo "########################################"
# echo "##### Updating Entitlements" echo "##### Updating Entitlements"
# echo "########################################" echo "########################################"
# perl -0777 -pi.bak -e 's/<key>aps-environment<\/key>\s*<string>development<\/string>/<key>aps-environment<\/key>\n\t<string>production<\/string>/' ./src/iOS/Entitlements.plist perl -0777 -pi.bak -e 's/<key>aps-environment<\/key>\s*<string>development<\/string>/<key>aps-environment<\/key>\n\t<string>production<\/string>/' ./${{ env.ios_folder_path }}/Entitlements.plist
# shell: bash shell: bash
# - name: Set up Keychain - name: Set up Keychain
# env: env:
# KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }} KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }}
# MOBILE_KEY_PASSWORD: ${{ secrets.IOS_KEY_PASSWORD }} MOBILE_KEY_PASSWORD: ${{ secrets.IOS_KEY_PASSWORD }}
# DIST_CERT_PASSWORD: ${{ secrets.IOS_DIST_CERT_PASSWORD }} DIST_CERT_PASSWORD: ${{ secrets.IOS_DIST_CERT_PASSWORD }}
# run: | run: |
# security create-keychain -p $KEYCHAIN_PASSWORD build.keychain security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
# security default-keychain -s build.keychain security default-keychain -s build.keychain
# security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
# security set-keychain-settings -lut 1200 build.keychain security set-keychain-settings -lut 1200 build.keychain
# security import ~/secrets/bitwarden-mobile-key.p12 -k build.keychain -P $MOBILE_KEY_PASSWORD \ security import ~/secrets/bitwarden-mobile-key.p12 -k build.keychain -P $MOBILE_KEY_PASSWORD \
# -T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/codesign -T /usr/bin/security
# security import ~/secrets/iphone-distribution-cert.p12 -k build.keychain -P $DIST_CERT_PASSWORD \ security import ~/secrets/iphone-distribution-cert.p12 -k build.keychain -P $DIST_CERT_PASSWORD \
# -T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/codesign -T /usr/bin/security
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
# shell: bash shell: bash
# - name: Set up provisioning profiles - name: Set up provisioning profiles
# run: | run: |
# AUTOFILL_PROFILE_PATH=$HOME/secrets/dist_autofill.mobileprovision AUTOFILL_PROFILE_PATH=$HOME/secrets/dist_autofill.mobileprovision
# BITWARDEN_PROFILE_PATH=$HOME/secrets/dist_bitwarden.mobileprovision BITWARDEN_PROFILE_PATH=$HOME/secrets/dist_bitwarden.mobileprovision
# EXTENSION_PROFILE_PATH=$HOME/secrets/dist_extension.mobileprovision EXTENSION_PROFILE_PATH=$HOME/secrets/dist_extension.mobileprovision
# SHARE_EXTENSION_PROFILE_PATH=$HOME/secrets/dist_share_extension.mobileprovision SHARE_EXTENSION_PROFILE_PATH=$HOME/secrets/dist_share_extension.mobileprovision
# WATCH_APP_PROFILE_PATH=$HOME/secrets/dist_watch_app.mobileprovision WATCH_APP_PROFILE_PATH=$HOME/secrets/dist_watch_app.mobileprovision
# WATCH_APP_EXTENSION_PROFILE_PATH=$HOME/secrets/dist_watch_app_extension.mobileprovision WATCH_APP_EXTENSION_PROFILE_PATH=$HOME/secrets/dist_watch_app_extension.mobileprovision
# PROFILES_DIR_PATH=$HOME/Library/MobileDevice/Provisioning\ Profiles PROFILES_DIR_PATH=$HOME/Library/MobileDevice/Provisioning\ Profiles
# mkdir -p "$PROFILES_DIR_PATH" mkdir -p "$PROFILES_DIR_PATH"
# AUTOFILL_UUID=$(grep UUID -A1 -a $AUTOFILL_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}") AUTOFILL_UUID=$(grep UUID -A1 -a $AUTOFILL_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}")
# cp $AUTOFILL_PROFILE_PATH "$PROFILES_DIR_PATH/$AUTOFILL_UUID.mobileprovision" cp $AUTOFILL_PROFILE_PATH "$PROFILES_DIR_PATH/$AUTOFILL_UUID.mobileprovision"
# BITWARDEN_UUID=$(grep UUID -A1 -a $BITWARDEN_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}") BITWARDEN_UUID=$(grep UUID -A1 -a $BITWARDEN_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}")
# cp $BITWARDEN_PROFILE_PATH "$PROFILES_DIR_PATH/$BITWARDEN_UUID.mobileprovision" cp $BITWARDEN_PROFILE_PATH "$PROFILES_DIR_PATH/$BITWARDEN_UUID.mobileprovision"
# EXTENSION_UUID=$(grep UUID -A1 -a $EXTENSION_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}") EXTENSION_UUID=$(grep UUID -A1 -a $EXTENSION_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}")
# cp $EXTENSION_PROFILE_PATH "$PROFILES_DIR_PATH/$EXTENSION_UUID.mobileprovision" cp $EXTENSION_PROFILE_PATH "$PROFILES_DIR_PATH/$EXTENSION_UUID.mobileprovision"
# SHARE_EXTENSION_UUID=$(grep UUID -A1 -a $SHARE_EXTENSION_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}") SHARE_EXTENSION_UUID=$(grep UUID -A1 -a $SHARE_EXTENSION_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}")
# cp $SHARE_EXTENSION_PROFILE_PATH "$PROFILES_DIR_PATH/$SHARE_EXTENSION_UUID.mobileprovision" cp $SHARE_EXTENSION_PROFILE_PATH "$PROFILES_DIR_PATH/$SHARE_EXTENSION_UUID.mobileprovision"
# WATCH_APP_UUID=$(grep UUID -A1 -a $WATCH_APP_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}") WATCH_APP_UUID=$(grep UUID -A1 -a $WATCH_APP_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}")
# cp $WATCH_APP_PROFILE_PATH "$PROFILES_DIR_PATH/$WATCH_APP_UUID.mobileprovision" cp $WATCH_APP_PROFILE_PATH "$PROFILES_DIR_PATH/$WATCH_APP_UUID.mobileprovision"
# WATCH_APP_EXTENSION_UUID=$(grep UUID -A1 -a $WATCH_APP_EXTENSION_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}") WATCH_APP_EXTENSION_UUID=$(grep UUID -A1 -a $WATCH_APP_EXTENSION_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}")
# cp $WATCH_APP_EXTENSION_PROFILE_PATH "$PROFILES_DIR_PATH/$WATCH_APP_EXTENSION_UUID.mobileprovision" cp $WATCH_APP_EXTENSION_PROFILE_PATH "$PROFILES_DIR_PATH/$WATCH_APP_EXTENSION_UUID.mobileprovision"
# shell: bash shell: bash
# - name: Bulid WatchApp - name: Bulid WatchApp
# run: | run: |
# echo "########################################" echo "########################################"
# echo "##### Build WatchApp with Release Configuration" echo "##### Build WatchApp with Release Configuration"
# echo "########################################" echo "########################################"
# xcodebuild archive -workspace ./src/watchOS/bitwarden/bitwarden.xcodeproj/project.xcworkspace -configuration Release -scheme bitwarden\ WatchKit\ App -archivePath ./src/watchOS/bitwarden xcodebuild archive -workspace ./src/watchOS/bitwarden/bitwarden.xcodeproj/project.xcworkspace -configuration Release -scheme bitwarden\ WatchKit\ App -archivePath ./src/watchOS/bitwarden
# echo "########################################" echo "########################################"
# echo "##### Done" echo "##### Done"
# echo "########################################" echo "########################################"
# shell: bash shell: bash
# - name: Restore packages - name: Restore packages
# run: nuget restore run: nuget restore
# - name: Archive Build for App Store - name: Archive Build for App Store
# run: | run: |
# $configuration = "AppStore"; Write-Output "########################################"
# $platform = "iPhone"; Write-Output "##### Archive for Release ios-arm64
Write-Output "########################################"
# Write-Output "########################################" dotnet publish ${{ env.main_app_project_path }} -c Release -f ${{ env.target-net-version }}-ios /p:RuntimeIdentifier=ios-arm64 /p:ArchiveOnBuild=true /p:EnableAssemblyILStripping=false
# 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 "########################################"
# Write-Output "##### Done" Write-Output "##### Done"
# Write-Output "########################################" Write-Output "########################################"
# shell: pwsh shell: pwsh
# - name: Archive Build for Mobile Automation - name: Archive Build for Mobile Automation
# run: | run: |
# $configuration = "Release"; Write-Output "########################################"
# $platform = "iPhoneSimulator"; Write-Output "##### Archive Releae for iossimulator-arm64
Write-Output "########################################"
# Write-Output "########################################" dotnet publish ${{ env.main_app_project_path }} -c Release -f ${{ env.target-net-version }}-ios /p:RuntimeIdentifier=iossimulator-arm64 /p:ArchiveOnBuild=true /p:EnableAssemblyILStripping=false
# 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 "########################################"
# Write-Output "##### Done" Write-Output "##### Done"
# Write-Output "########################################" Write-Output "########################################"
# ls ~/Library/Developer/Xcode/Archives ls ~/Library/Developer/Xcode/Archives
# shell: pwsh shell: pwsh
# - name: Export .ipa for App Store - name: Export .ipa for App Store
# run: | run: |
# EXPORT_OPTIONS_PATH="./.github/resources/export-options-app-store.plist" EXPORT_OPTIONS_PATH="./.github/resources/export-options-app-store.plist"
# ARCHIVE_PATH="$HOME/Library/Developer/Xcode/Archives/*/*.xcarchive" ARCHIVE_PATH="$HOME/Library/Developer/Xcode/Archives/*/*.xcarchive"
# EXPORT_PATH="./bitwarden-export" EXPORT_PATH="./bitwarden-export"
# xcodebuild -exportArchive -archivePath $ARCHIVE_PATH -exportPath $EXPORT_PATH \ xcodebuild -exportArchive -archivePath $ARCHIVE_PATH -exportPath $EXPORT_PATH \
# -exportOptionsPlist $EXPORT_OPTIONS_PATH -exportOptionsPlist $EXPORT_OPTIONS_PATH
# shell: bash shell: bash
# - name: Export .app for Automation CI - name: Export .app for Automation CI
# run: | run: |
# ARCHIVE_PATH="./src/iOS/bin/iPhoneSimulator/Release/BitwardeniOS.app" ARCHIVE_PATH="./${{ env.main_app_folder_path }}/bin/Release/iossimulator-arm64/publish/${{ env.app_output_name }}.app"
# EXPORT_PATH="./bitwarden-export" EXPORT_PATH="./bitwarden-export"
# zip -r -q BitwardeniOS.app.zip $ARCHIVE_PATH zip -r -q ${{ env.app_output_name }}.app.zip $ARCHIVE_PATH
# mv BitwardeniOS.app.zip $EXPORT_PATH mv ${{ env.app_output_name }}.app.zip $EXPORT_PATH
# shell: bash shell: bash
# - name: Copy all dSYMs files to upload - name: Copy all dSYMs files to upload
# run: | run: |
# ARCHIVE_DSYMS_PATH="$HOME/Library/Developer/Xcode/Archives/*/*.xcarchive/dSYMs" ARCHIVE_DSYMS_PATH="$HOME/Library/Developer/Xcode/Archives/*/*.xcarchive/dSYMs"
# EXPORT_PATH="./bitwarden-export" EXPORT_PATH="./bitwarden-export"
# WATCH_ARCHIVE_DSYMS_PATH="./src/watchOS/bitwarden.xcarchive/dSYMs/" WATCH_ARCHIVE_DSYMS_PATH="./src/watchOS/bitwarden.xcarchive/dSYMs/"
# WATCH_DSYMS_EXPORT_PATH="$EXPORT_PATH/Watch_dSYMs" WATCH_DSYMS_EXPORT_PATH="$EXPORT_PATH/Watch_dSYMs"
# cp -r -v $ARCHIVE_DSYMS_PATH $EXPORT_PATH cp -r -v $ARCHIVE_DSYMS_PATH $EXPORT_PATH
# mkdir $WATCH_DSYMS_EXPORT_PATH mkdir $WATCH_DSYMS_EXPORT_PATH
# cp -r -v $WATCH_ARCHIVE_DSYMS_PATH $WATCH_DSYMS_EXPORT_PATH cp -r -v $WATCH_ARCHIVE_DSYMS_PATH $WATCH_DSYMS_EXPORT_PATH
# shell: bash shell: bash
# - name: Upload App Store .ipa & dSYMs artifacts - name: Upload App Store .ipa & dSYMs artifacts
# uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0 uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
# with: with:
# name: Bitwarden iOS name: Bitwarden iOS
# path: | path: |
# ./bitwarden-export/Bitwarden.ipa ./bitwarden-export/${{ env.app_output_name }}.ipa
# ./bitwarden-export/dSYMs/*.* ./bitwarden-export/dSYMs/*.*
# if-no-files-found: error if-no-files-found: error
# - name: Upload .app file for Automation CI - name: Upload .app file for Automation CI
# uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0 uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
# with: with:
# name: BitwardeniOS.app.zip name: ${{ env.app_output_name }}.app.zip
# path: ./bitwarden-export/BitwardeniOS.app.zip path: ./bitwarden-export/${{ env.app_output_name }}.app.zip
# if-no-files-found: error if-no-files-found: error
# - name: Install AppCenter CLI - name: Install AppCenter CLI
# if: | if: |
# (github.ref == 'refs/heads/master' (github.ref == 'refs/heads/master'
# && needs.setup.outputs.rc_branch_exists == 0 && needs.setup.outputs.rc_branch_exists == 0
# && needs.setup.outputs.hotfix_branch_exists == 0) && needs.setup.outputs.hotfix_branch_exists == 0)
# || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0) || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0)
# || github.ref == 'refs/heads/hotfix-rc' || github.ref == 'refs/heads/hotfix-rc'
# run: npm install -g appcenter-cli run: npm install -g appcenter-cli
# - name: Upload dSYMs to App Center - name: Upload dSYMs to App Center
# if: | if: |
# (github.ref == 'refs/heads/master' (github.ref == 'refs/heads/master'
# && needs.setup.outputs.rc_branch_exists == 0 && needs.setup.outputs.rc_branch_exists == 0
# && needs.setup.outputs.hotfix_branch_exists == 0) && needs.setup.outputs.hotfix_branch_exists == 0)
# || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0) || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0)
# || github.ref == 'refs/heads/hotfix-rc' || github.ref == 'refs/heads/hotfix-rc'
# env: env:
# APPCENTER_IOS_TOKEN: ${{ steps.retrieve-secrets.outputs.appcenter-ios-token }} APPCENTER_IOS_TOKEN: ${{ steps.retrieve-secrets.outputs.appcenter-ios-token }}
# run: appcenter crashes upload-symbols -a bitwarden/bitwarden -s "./bitwarden-export/dSYMs" --token $APPCENTER_IOS_TOKEN run: appcenter crashes upload-symbols -a bitwarden/bitwarden -s "./bitwarden-export/dSYMs" --token $APPCENTER_IOS_TOKEN
# shell: bash shell: bash
# - name: Upload Watch dSYMs to Firebase Crashlytics - name: Upload Watch dSYMs to Firebase Crashlytics
# if: | if: |
# (github.ref == 'refs/heads/master' (github.ref == 'refs/heads/master'
# && needs.setup.outputs.rc_branch_exists == 0 && needs.setup.outputs.rc_branch_exists == 0
# && needs.setup.outputs.hotfix_branch_exists == 0) && needs.setup.outputs.hotfix_branch_exists == 0)
# || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0) || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0)
# || github.ref == 'refs/heads/hotfix-rc' || github.ref == 'refs/heads/hotfix-rc'
# run: | run: |
# echo "########################################" echo "########################################"
# echo "##### Uploading Watch dSYMs to Firebase" echo "##### Uploading Watch dSYMs to Firebase"
# echo "########################################" echo "########################################"
# find "$HOME/Library/Developer/XCode/DerivedData" -name "upload-symbols" -exec chmod +x {} \; -exec {} -gsp "./src/watchOS/bitwarden/GoogleService-Info.plist" -p ios "./bitwarden-export/Watch_dSYMs" \; find "$HOME/Library/Developer/XCode/DerivedData" -name "upload-symbols" -exec chmod +x {} \; -exec {} -gsp "./src/watchOS/bitwarden/GoogleService-Info.plist" -p ios "./bitwarden-export/Watch_dSYMs" \;
# shell: bash shell: bash
# - name: Deploy to App Store - name: Deploy to App Store
# if: | if: |
# (github.ref == 'refs/heads/master' (github.ref == 'refs/heads/master'
# && needs.setup.outputs.rc_branch_exists == 0 && needs.setup.outputs.rc_branch_exists == 0
# && needs.setup.outputs.hotfix_branch_exists == 0) && needs.setup.outputs.hotfix_branch_exists == 0)
# || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0) || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0)
# || github.ref == 'refs/heads/hotfix-rc' || github.ref == 'refs/heads/hotfix-rc'
# env: env:
# APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }} APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
# APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
# run: | run: |
# xcrun altool --upload-app --type ios --file "./bitwarden-export/Bitwarden.ipa" \ xcrun altool --upload-app --type ios --file "./bitwarden-export/${{ env.app_output_name }}.ipa" \
# --username "$APPLE_ID_USERNAME" --password "$APPLE_ID_PASSWORD" --username "$APPLE_ID_USERNAME" --password "$APPLE_ID_PASSWORD"
# shell: bash shell: bash
# crowdin-push: # crowdin-push: