From 89b54dc1ac4511494711c7fa72f3b9243fdad955 Mon Sep 17 00:00:00 2001 From: coolnsx Date: Sun, 2 Jun 2024 20:45:14 +0530 Subject: [PATCH] Feat: Add notification for new release --- .github/workflows/blank.yml | 12 ++++++++++++ revanced | 2 +- track | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index e44f702..fadc43a 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -40,6 +40,18 @@ jobs: file_glob: true body: "New Releases." + - name: Notify For New Release + if: ${{ steps.check_apks.outputs.apks_exist == 'true' }} + env: + NTFY_URL: ${{ secrets.NTFY_URL }} + NTFY_TOPIC: ${{ secrets.NTFY_TOPIC }} + NTFY_TOKEN: ${{ secrets.NTFY_TOKEN }} + RELEASE_TAG: ${{ steps.check_apks.outputs.RELEASE_TAG }} + run: | + for i in *.apk;do + app_url="https://github.com/$GITHUB_REPOSITORY/releases/download/$RELEASE_TAG/$i" + curl -s "$NTFY_URL/$NTFY_TOPIC" -d "$app_url" -H "Authorization: Bearer $NTFY_TOKEN" -H "Download: $(printf "%s" "$i" | tr '-' ' ')" -H "Click: $app_url" + done - name: auwuto commit uwu uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/revanced b/revanced index 240cc5b..58d1800 100755 --- a/revanced +++ b/revanced @@ -45,7 +45,7 @@ case $app in ;; youtube-music) arch="arm64-v8a" - [ -z "$2" ] && version="$(curl -s "https://www.apkmirror.com/apk/google-inc/youtube-music/" -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" | sed -nE 's|.*youtube-music/youtube-music-(.*)-release/".*|\1|p' | head -1)" || version=$2 + [ -z "$2" ] && version="$(curl -s "https://www.apkmirror.com/apk/google-inc/youtube-music/" -A "$agent" | sed -nE 's|.*youtube-music/youtube-music-(.*)-release/".*|\1|p' | head -1)" || version=$2 exclude_patch_list="" out="yt-music-revanced-$version.apk" ;; diff --git a/track b/track index c1061cc..dbc0dfa 100644 --- a/track +++ b/track @@ -1,2 +1,2 @@ -youtube 19-11-43 -youtube-music 7-03-52 +youtube +youtube-music