New admob account #134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android Build On Merge | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d__%H_%M_%S')" >> $GITHUB_OUTPUT | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" # See 'Supported distributions' for available options | |
java-version: "17" | |
- name: Build with Gradle | |
run: bash ./gradlew assembleDebugWithR8 --stacktrace | |
- name: Rename File | |
run: | | |
cp "app/build/outputs/apk/debugWithR8/app-debugWithR8.apk" "app/build/outputs/apk/debugWithR8/app-${{ steps.date.outputs.date }}.apk" | |
- name: Upload APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "ANDROID_APP_${{ steps.date.outputs.date }}" | |
path: app/build/outputs/apk/debugWithR8/app-${{ steps.date.outputs.date }}.apk | |
- name: Send telegram message | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
document: app/build/outputs/apk/debugWithR8/app-${{ steps.date.outputs.date }}.apk | |
format: markdown | |
message: | | |
🔥 New build from ${{ github.actor }} 🔥 | |
${{ github.event.commits[0].url }} |