Skip to content

[UITracker] Display current activity name when possible #2769

[UITracker] Display current activity name when possible

[UITracker] Display current activity name when possible #2769

Workflow file for this run

name: Debug Build
on:
push:
branches:
- 'master'
- 'AppManager-*'
paths-ignore:
- 'fastlane/**'
- 'scripts/**'
- '*.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'fastlane/**'
- 'scripts/**'
- '*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get app version
run: echo "APP_VERSION=v$(cat ./app/build.gradle | grep -m1 versionName | awk -F \" '{print $2}')" >> $GITHUB_ENV
- name: Get app name
run: echo "APP_NAME=AppManager_${{ env.APP_VERSION }}-DEBUG#${{ github.run_number }}" >> $GITHUB_ENV
- name: Inject run number
run: sed -i -e 's|versionName "\([0-9\.]\+\)"|versionName "\1-${{ github.run_number }}"|' ./app/build.gradle
- name: Build with Gradle
run: ./gradlew packageDebugUniversalApk
- name: Rename the APK file
run: mv ./app/build/outputs/apk_from_bundle/debug/app-debug-universal.apk ./${{ env.APP_NAME }}.apk
- name: Store generated APK file
uses: actions/upload-artifact@v3
with:
name: ${{ env.APP_NAME }}
path: ./${{ env.APP_NAME }}.apk
- name: Upload APK to telegram
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
document: ./${{ env.APP_NAME }}.apk
format: markdown
message: |
*AM Debug ${{ env.APP_VERSION }} Run#${{ github.run_number }}*
${{ github.event.head_commit.message }}
continue-on-error: true