Merge pull request #1339 from LibreTubeAlpha/master

Archive Uploading policy to official repo only
This commit is contained in:
Bnyro 2022-09-22 13:20:57 +02:00 committed by GitHub
commit faf88c1d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 9 deletions

15
.github/uploader.py vendored Normal file
View File

@ -0,0 +1,15 @@
from os import system as run
import tgconfig
if tgconfig.GH_REPO.lower() == "libre-tube/libretube":
run("git clone https://github.com/LibreTubeAlpha/Archive archive")
run("rm -rf archive/*.apk")
run("mv app/build/outputs/apk/debug/*.apk archive/")
run("cd archive")
run("git add -f *")
run('git commit -m "WORKFLOW: ALPHA BUILDS"')
run("git push -u")
run("cd ..")
else:
run("mkdir archive")
run("mv app/build/outputs/apk/debug/*.apk archive/")

View File

@ -40,7 +40,7 @@ jobs:
distribution: "temurin" distribution: "temurin"
cache: "gradle" cache: "gradle"
- name: Prepare for Compilation - name: Git Configuraion
run: | run: |
git config --global user.name "alefvanoon" git config --global user.name "alefvanoon"
git config --global user.email "53198048+alefvanoon@users.noreply.github.com" git config --global user.email "53198048+alefvanoon@users.noreply.github.com"
@ -57,13 +57,9 @@ jobs:
- name: Upload to Archive - name: Upload to Archive
continue-on-error: true continue-on-error: true
run: | run: |
git clone https://github.com/LibreTubeAlpha/Archive archive mv .github/uploader.py .
rm -rf archive/*.apk echo "GH_REPO = '${{ github.repository }}'" > tgconfig.py
mv app/build/outputs/apk/debug/*.apk archive/ python uploader.py
cd archive
git add -f *
git commit -m "WORKFLOW: ALPHA BUILDS"
git push -u
- name: Telegram Bot - name: Telegram Bot
continue-on-error: true continue-on-error: true
@ -72,7 +68,8 @@ jobs:
curl https://libre-tube.github.io/images/LibreAlpha.png --output alpha.png curl https://libre-tube.github.io/images/LibreAlpha.png --output alpha.png
curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/exec --output bot-api curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/exec --output bot-api
chmod 755 ./bot-api chmod 755 ./bot-api
echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" > tgconfig.py mv ../tgconfig.py .
echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" >> tgconfig.py
echo "TG_API_ID = '${{ secrets.TG_API_ID }}'" >> tgconfig.py echo "TG_API_ID = '${{ secrets.TG_API_ID }}'" >> tgconfig.py
echo "TG_POST_ID = '${{ secrets.TG_POST_ID }}'" >> tgconfig.py echo "TG_POST_ID = '${{ secrets.TG_POST_ID }}'" >> tgconfig.py
echo "TG_API_HASH = '${{ secrets.TG_API_HASH }}'" >> tgconfig.py echo "TG_API_HASH = '${{ secrets.TG_API_HASH }}'" >> tgconfig.py