From d65bb7a1c128de50da08fac5185956719bba491c Mon Sep 17 00:00:00 2001 From: XelXen <78258352+XelXen@users.noreply.github.com> Date: Sun, 12 Jun 2022 12:40:04 +0530 Subject: [PATCH] Seperate CI for PR diff --- .github/workflows/ci.yml | 15 ------------- .github/workflows/tg-bot.yml | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/tg-bot.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd7737862..63af540b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,14 +18,9 @@ on: jobs: debug-builds: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - uses: gradle/wrapper-validation-action@v1 - - uses: actions/setup-python@v3 - with: - python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax - architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - name: set up JDK 11 uses: actions/setup-java@v3 @@ -42,13 +37,3 @@ jobs: with: name: app path: app/build/outputs/apk/debug/*.apk - - - name: Telegram Bot - run: | - mv app/build/outputs/apk/debug/*.apk .github/ - cd .github - curl https://libre-tube.github.io/assets/LibreSpace.png --output space.png - echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" > tgconfig.py - python -m pip install --upgrade pip - pip install python-telegram-bot - python tg.py diff --git a/.github/workflows/tg-bot.yml b/.github/workflows/tg-bot.yml new file mode 100644 index 000000000..2f91b0968 --- /dev/null +++ b/.github/workflows/tg-bot.yml @@ -0,0 +1,41 @@ +name: Telegram Builder + +on: + workflow_dispatch: + push: + paths-ignore: + - "README*.md" + - "fastlane/**" + - "assets/**" + - ".github/**/*.md" + +jobs: + debug-builds: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/setup-python@v3 + with: + python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax + architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified + + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: "temurin" + cache: "gradle" + + - name: Build debug APK and run jvm tests + run: ./gradlew assembleDebug + + - name: Telegram Bot + run: | + mv app/build/outputs/apk/debug/*.apk .github/ + cd .github + curl https://libre-tube.github.io/assets/LibreSpace.png --output space.png + echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" > tgconfig.py + python -m pip install --upgrade pip + pip install python-telegram-bot + python tg.py