File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 5050 uses : actions/upload-artifact@v4
5151 with :
5252 name : app
53- path : hviewer-debug.apk
53+ path : hviewer-debug.apk
Original file line number Diff line number Diff line change 7373 hviewer-${{ github.ref_name }}-x86_64-release.apk
7474 fail_on_unmatched_files : true
7575 make_latest : true
76+
77+ - name : Send APK links to Telegram
78+ env :
79+ TELEGRAM_BOT_TOKEN : ${{ secrets.TELEGRAM_BOT_TOKEN }}
80+ TELEGRAM_CHAT_ID : ${{ secrets.TELEGRAM_CHAT_ID }}
81+ VERSION : ${{ github.ref_name }}
82+ run : |
83+ repo_url=$(git remote get-url origin)
84+ username=$(echo "$repo_url" | sed -E 's#.*github.com[:/](.*)/(.*).git#\1#')
85+ repo_name=$(echo "$repo_url" | sed -E 's#.*github.com[:/](.*)/(.*).git#\2#')
86+ architectures=("arm64-v8a" "armeabi-v7a" "universal" "x86" "x86_64")
87+
88+ MESSAGE="🚀 *New Release Available! $$VERSION*\n\n"
89+
90+ for arch in "${architectures[@]}"; do
91+ name="hviewer-$VERSION-$arch-release.apk"
92+ MESSAGE+="🔹 [$name](https://github.com/$username/$repo_name/releases/latest/download/$name)\n"
93+ done
94+
95+ curl -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
96+ -d "chat_id=$TELEGRAM_CHAT_ID" \
97+ -d "parse_mode=Markdown" \
98+ -d "text=$MESSAGE"
You can’t perform that action at this time.
0 commit comments