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