LibreTube/.github/workflows/tg-bot.yml

47 lines
1.4 KiB
YAML
Raw Normal View History

2022-06-12 12:40:04 +05:30
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"
2022-06-15 20:57:59 +05:30
- name: Patch and Compile
2022-06-15 20:59:23 +05:30
run: |
cd .github
python patch.py
2022-06-15 21:09:00 +05:30
cd ..
2022-06-15 20:59:23 +05:30
./gradlew assembleDebug
2022-06-12 12:40:04 +05:30
- name: Telegram Bot
run: |
2022-06-15 21:09:00 +05:30
mv ./app/build/outputs/apk/debug/*.apk .
cd .github
2022-06-12 23:11:49 +05:30
curl https://libre-tube.github.io/assets/LibreAlpha.png --output alpha.png
2022-06-12 12:40:04 +05:30
echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" > tgconfig.py
2022-06-12 23:11:49 +05:30
curl https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }} > commit.json
2022-06-12 12:40:04 +05:30
python -m pip install --upgrade pip
pip install python-telegram-bot
python tg.py