<commit_before>name: Deploy APK on GitHub

on:
  release:
    types:
      - created

env:
  GRADLE_FILE: "mobile/build.gradle"

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Bump version
        run: |
          # Get and bump version code
          VERSION_CODE=$(grep 'versionCode' $GRADLE_FILE | sed -r 's/(.*) (.*)$/\2/')
          let VERSION_CODE++

          # Remove "-release$" and and "^refs/tags/" from version name
          TAG_NAME="${GITHUB_REF##*/}"
          VERSION_NAME="${TAG_NAME%-release}"

          echo "Replace versionCode with $VERSION_CODE"
          sed --in-place -r "s/versionCode (.*)/versionCode ${VERSION_CODE}/" $GRADLE_FILE
          echo "Replace versionName with $VERSION_NAME"
          sed --in-place -r "s/versionName \"(.*)\"/versionName \"${VERSION_NAME}\"/" $GRADLE_FILE
          
      - name: Select flavor
        run: |
          if $(echo "$GITHUB_REF" | grep -q "beta")
          then
              releaseFlavor="Beta"
          else
              releaseFlavor="Stable"
          fi
          echo "Use $releaseFlavor"
          echo "releaseFlavor=$releaseFlavor"   >> $GITHUB_ENV
          
      - name: Build APK
        run: bash gradlew :mobile:assembleFull${{ env.releaseFlavor }}Release
        
      - uses: r0adkll/sign-android-release@v1.0.4
        name: Sign APK
        id: sign_app
        with:
          releaseDirectory: mobile/build/outputs/apk/full${{ env.releaseFlavor }}/release
          signingKeyBase64: ${{ secrets.SIGNING_KEY }}
          alias: "sign"
          keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
          
      - uses: svenstaro/upload-release-action@v2<commit_msg>Restore Google Maps API key (#2418)<commit_after>name: Deploy APK on GitHub

on:
  release:
    types:
      - created

env:
  GRADLE_FILE: "mobile/build.gradle"

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Bump version
        run: |
          # Get and bump version code
          VERSION_CODE=$(grep 'versionCode' $GRADLE_FILE | sed -r 's/(.*) (.*)$/\2/')
          let VERSION_CODE++

          # Remove "-release$" and and "^refs/tags/" from version name
          TAG_NAME="${GITHUB_REF##*/}"
          VERSION_NAME="${TAG_NAME%-release}"

          echo "Replace versionCode with $VERSION_CODE"
          sed --in-place -r "s/versionCode (.*)/versionCode ${VERSION_CODE}/" $GRADLE_FILE
          echo "Replace versionName with $VERSION_NAME"
          sed --in-place -r "s/versionName \"(.*)\"/versionName \"${VERSION_NAME}\"/" $GRADLE_FILE
          
      - name: Select flavor
        run: |
          if $(echo "$GITHUB_REF" | grep -q "beta")
          then
              releaseFlavor="Beta"
          else
              releaseFlavor="Stable"
          fi
          echo "Use $releaseFlavor"
          echo "releaseFlavor=$releaseFlavor"   >> $GITHUB_ENV

      - name: Setup Google API Key
        run: echo "mapsApiKey=<KEY>" >> ~/.gradle/gradle.properties
          
      - name: Build APK
        run: bash gradlew :mobile:assembleFull${{ env.releaseFlavor }}Release
        
      - uses: r0adkll/sign-android-release@v1.0.4
        name: Sign APK
        id: sign_app
        with:
          releaseDirectory: mobile/build/outputs/apk/full${{ env.releaseFlavor }}/release
          signingKeyBase64: ${{ secrets.SIGNING_KEY }}
          alias: "sign"
          keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
          
      - uses: svenstaro/upload-release-action@v2
{'fraction_non_alphanumeric': 0.12695749440715884, 'fraction_numerical': 0.006152125279642058, 'mean_word_length': 1.953757225433526, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5606606', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1108, 'n_words': 255}