<commit_before>---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
  envs:
  - opts:
      is_expand: true
    XAMARIN_SOLUTION_FILEPATH: Customers.sln
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FOLDERPATH_IOS: iOS
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FOLDERPATH_ANDROID: Droid
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILENAME_IOS: Customers.iOS.csproj
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILENAME_ANDROID: Customers.Droid.csproj
  - opts:
      is_expand: true
    XAMARIN_CONFIG_IOS: Debug
  - opts:
      is_expand: true
    XAMARIN_CONFIG_ANDROID: Release
  - opts:
      is_expand: true
    XAMARIN_PLATFORM_IOS: iPhone
  - opts:
      is_expand: true
    XAMARIN_PLATFORM_ANDROID: AnyCPU
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_FILENAME_IOS: Customers.ipa
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_FILENAME_ANDROID_UNSIGNED: com.xamarin.customers.apk
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_FILENAME_ANDROID_SIGNED: signed-com.xamarin.customers.apk
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILEPATH_IOS: "$XAMARIN_PROJECT_FOLDERPATH_IOS/$XAMARIN_PROJECT_FILENAME_IOS"
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILEPATH_ANDROID: "$XAMARIN_PROJECT_FOLDERPATH_ANDROID/$XAMARIN_PROJECT_FILENAME_ANDROID"
  - opts:
      is_expand: true
    XAMARIN_IPA_PATH: "$XAMARIN_PROJECT_FOLDERPATH_IOS/bin/$XAMARIN_PLATFORM_IOS/$XAMARIN_CONFIG_IOS/$XAMARIN_OUTPUT_FILENAME_IOS"
  - opts:
      is_expand: true
    XAMARIN_APK_SOURCE_PATH: "$XAMARIN_PROJECT_FOLDERPATH_ANDROID/bin/$XAMARIN_PLATFORM_ANDROID/$XAMARIN_CONFIG_ANDROID/$XAMARIN_OUTPUT_FILENAME_ANDROID_UNSIGNED"
  - opts:
      is_expand: true
    XAMARIN_APK_DESTINATION_PATH: "$XAMARIN_PROJECT_FOLDERPATH_ANDROID/bin/$XAMARIN_PLATFORM_ANDROID/$XAMARIN_CONFIG_ANDROID/$XAMARIN_OUTPUT_FILENAME_ANDROID_SIGNED"
trigger_map:
- pattern: master
  is_pull_request_allowed: false
  workflow: master
workflows:
  master:
    steps:
    - activate-ssh-key:
        title: Activate App SSH key
        inputs:
        - ssh_key_save_path: "$HOME/.ssh/steplib_ssh_step_id_rsa"
    - git-clone: {}
    - certificate-and-profile-installer: {}
    - xamarin-user-management: {}
    - nuget-restore:
        inputs:
        - xamarin_solution: "$XAMARIN_SOLUTION_FILEPATH"
    - xamarin-components-restore:
        inputs:
        - xamarin_solution: "$XAMARIN_SOLUTION_FILEPATH"
    - xamarin-builder@0.9.2:
        title: Build iOS
        inputs:
        - xamarin_project: "$XAMARIN_PROJECT_FILEPATH_IOS"
        - xamarin_configuration: "$XAMARIN_CONFIG_IOS"
        - xamarin_platform: "$XAMARIN_PLATFORM_IOS"
        - is_clean_build: 'true'
    - script:
        inputs:
        - content: |-
            #!/bin/bash

            sed -i '' "s/GOOGLE_MAPS_API_KEY/$GOOGLE_MAPS_API_KEY/g" "Droid/Properties/AndroidManifest.xml"
          opts:
            is_expand: true
        - working_dir: ''
          opts:
            is_expand: false
    - xamarin-builder:
        title: Build Android
        inputs:
        - xamarin_project: "$XAMARIN_PROJECT_FILEPATH_ANDROID"
        - xamarin_configuration: "$XAMARIN_CONFIG_ANDROID"
        - xamarin_platform: "$XAMARIN_PLATFORM_ANDROID"
        - is_clean_build: 'false'
        - command: archive
    - sign-apk:
        inputs:
        - apk_path: "$XAMARIN_APK_SOURCE_PATH"
    - xamarin-user-management:
        inputs:
        - xamarin_action: logout
    - deploy-to-bitrise-io:
        title: Deploy IPA
        inputs:
        - deploy_path: "$XAMARIN_IPA_PATH"
    - deploy-to-bitrise-io:
        title: Deploy APK
        inputs:
        - deploy_path: "$XAMARIN_APK_DESTINATION_PATH"
    before_run: 
    after_run: <commit_msg>Updating Bitrise workflow config yml, even though the Android version bump step is missing for now until it's fixed.<commit_after>---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
  envs:
  - opts:
      is_expand: true
    XAMARIN_SOLUTION_FILEPATH: Customers.sln
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FOLDERPATH_IOS: iOS
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FOLDERPATH_ANDROID: Droid
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILENAME_IOS: Customers.iOS.csproj
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILENAME_ANDROID: Customers.Droid.csproj
  - opts:
      is_expand: true
    XAMARIN_CONFIG_IOS: Release
  - opts:
      is_expand: true
    XAMARIN_CONFIG_ANDROID: Release
  - opts:
      is_expand: true
    XAMARIN_PLATFORM_IOS: iPhone
  - opts:
      is_expand: true
    XAMARIN_PLATFORM_ANDROID: AnyCPU
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_FILENAME_IOS: Customers.ipa
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_DSYM_UNZIPPED_FILENAME: CustomersiOS.app.dSYM
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_DSYM_ZIPPED_FILENAME: CustomersiOS.app.dSYM.zip
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_FILENAME_ANDROID_UNSIGNED: com.xamarin.customers.apk
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_FILENAME_ANDROID_SIGNED: signed-com.xamarin.customers.apk
  - opts:
      is_expand: true
    XAMARIN_IOS_INFOPLIST_FILEPATH: "$XAMARIN_PROJECT_FOLDERPATH_IOS/Info.plist"
  - opts:
      is_expand: true
    XAMARIN_ANDROID_MANIFESTXML_FILEPATH: "$XAMARIN_PROJECT_FOLDERPATH_ANDROID/Properties/AndroidManifest.xml"
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILEPATH_IOS: "$XAMARIN_PROJECT_FOLDERPATH_IOS/$XAMARIN_PROJECT_FILENAME_IOS"
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILEPATH_ANDROID: "$XAMARIN_PROJECT_FOLDERPATH_ANDROID/$XAMARIN_PROJECT_FILENAME_ANDROID"
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_FOLDERPATH_IOS: "$XAMARIN_PROJECT_FOLDERPATH_IOS/bin/$XAMARIN_PLATFORM_IOS/$XAMARIN_CONFIG_IOS"
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_FOLDERPATH_ANDROID: "$XAMARIN_PROJECT_FOLDERPATH_ANDROID/bin/$XAMARIN_PLATFORM_ANDROID/$XAMARIN_CONFIG_ANDROID"
  - opts:
      is_expand: true
    XAMARIN_PROJECT_FILEPATH_ANDROID: "$XAMARIN_PROJECT_FOLDERPATH_ANDROID/$XAMARIN_PROJECT_FILENAME_ANDROID"
  - opts:
      is_expand: true
    XAMARIN_IPA_PATH: "$XAMARIN_OUTPUT_FOLDERPATH_IOS/$XAMARIN_OUTPUT_FILENAME_IOS"
  - opts:
      is_expand: true
    XAMARIN_APK_SOURCE_PATH: "$XAMARIN_OUTPUT_FOLDERPATH_ANDROID/$XAMARIN_OUTPUT_FILENAME_ANDROID_UNSIGNED"
  - opts:
      is_expand: true
    XAMARIN_APK_DESTINATION_PATH: "$XAMARIN_OUTPUT_FOLDERPATH_ANDROID/$XAMARIN_OUTPUT_FILENAME_ANDROID_SIGNED"
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_DSYM_UNZIPPED_FILEPATH: "$XAMARIN_OUTPUT_FOLDERPATH_IOS/$XAMARIN_OUTPUT_DSYM_UNZIPPED_FILENAME"
  - opts:
      is_expand: true
    XAMARIN_OUTPUT_DSYM_ZIPPED_FILEPATH: "$XAMARIN_OUTPUT_FOLDERPATH_IOS/$XAMARIN_OUTPUT_DSYM_ZIPPED_FILENAME"
trigger_map:
- pattern: master
  is_pull_request_allowed: false
  workflow: master
workflows:
  master:
    steps:
    - activate-ssh-key:
        title: Activate App SSH key
        inputs:
        - ssh_key_save_path: "$HOME/.ssh/steplib_ssh_step_id_rsa"
    - git-clone: {}
    - certificate-and-profile-installer: {}
    - xamarin-user-management:
        title: Xamarin Login
    - nuget-restore:
        title: Restore NuGets
        inputs:
        - xamarin_solution: "$XAMARIN_SOLUTION_FILEPATH"
    - xamarin-components-restore:
        title: Restore Components
        inputs:
        - xamarin_solution: "$XAMARIN_SOLUTION_FILEPATH"
    - set-xcode-build-number@1.0.1:
        inputs:
        - plist_path: "$XAMARIN_IOS_INFOPLIST_FILEPATH"
    - xamarin-builder@0.9.2:
        title: Build iOS
        inputs:
        - xamarin_project: "$XAMARIN_PROJECT_FILEPATH_IOS"
        - xamarin_configuration: "$XAMARIN_CONFIG_IOS"
        - xamarin_platform: "$XAMARIN_PLATFORM_IOS"
        - is_clean_build: 'true'
    - script@1.1.0:
        title: Upload DSYMs to Xamarin Insights
        inputs:
        - content: |-
            #!/bin/bash

            zip -r $XAMARIN_OUTPUT_DSYM_ZIPPED_FILEPATH $XAMARIN_OUTPUT_DSYM_UNZIPPED_FILEPATH

            curl -F "dsym=@$XAMARIN_OUTPUT_DSYM_ZIPPED_FILEPATH;type=application/zip" https://xaapi.xamarin.com/api/dsym?apikey=$XAMARIN_INSIGHTS_KEY
          opts:
            is_expand: true
    - script:
        title: Inject Google Maps API key
        inputs:
        - content: |-
            #!/bin/bash

            sed -i '' "s/GOOGLE_MAPS_API_KEY/$GOOGLE_MAPS_API_KEY/g" "$XAMARIN_PROJECT_FOLDERPATH_ANDROID/Properties/AndroidManifest.xml"
          opts:
            is_expand: true
        - working_dir: ''
          opts:
            is_expand: false
    - xamarin-builder:
        title: Build Android
        inputs:
        - xamarin_project: "$XAMARIN_PROJECT_FILEPATH_ANDROID"
        - xamarin_configuration: "$XAMARIN_CONFIG_ANDROID"
        - xamarin_platform: "$XAMARIN_PLATFORM_ANDROID"
        - is_clean_build: 'false'
        - command: archive
    - sign-apk:
        inputs:
        - apk_path: "$XAMARIN_APK_SOURCE_PATH"
    - xamarin-user-management:
        title: Xamarin Logout
        inputs:
        - xamarin_action: logout
    - deploy-to-bitrise-io:
        title: Deploy IPA
        inputs:
        - deploy_path: "$XAMARIN_IPA_PATH"
    - deploy-to-bitrise-io:
        title: Deploy APK
        inputs:
        - deploy_path: "$XAMARIN_APK_DESTINATION_PATH"
    before_run: 
    after_run: 
{'fraction_non_alphanumeric': 0.08318340565139168, 'fraction_numerical': 0.0019049634881998095, 'mean_word_length': 2.9722572509457756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6079551', 'n_tokens_mistral': 3748, 'n_tokens_neox': 3678, 'n_words': 484}