Post builds to channel

This commit is contained in:
tehcneko 2021-01-28 22:51:02 +08:00
parent 55058442a7
commit 5e01d341ee
2 changed files with 10 additions and 1 deletions

View File

@ -44,3 +44,12 @@ jobs:
with: with:
name: LSPosed-debug name: LSPosed-debug
path: './LSPosed-debug/*' path: './LSPosed-debug/*'
- name: Post to channel
env:
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
OUTPUT="edxp-core/release/"
export release=$(find $OUTPUT -name "LSPosed-v*-release.zip")
export debug=$(find $OUTPUT -name "LSPosed-v*-debug.zip")
curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${CHANNEL_ID}&media=%5B%7B%22type%22:%22document%22,%20%22media%22:%22attach://release%22%7D,%7B%22type%22:%22document%22,%20%22media%22:%22attach://debug%22%7D%5D" -F release="@$release" -F debug="@$debug"

View File

@ -135,7 +135,7 @@ afterEvaluate {
android.applicationVariants.all { variant -> android.applicationVariants.all { variant ->
def variantCapped = variant.name.capitalize() def variantCapped = variant.name.capitalize()
def variantLowered = variant.name.toLowerCase() def variantLowered = variant.name.toLowerCase()
def zipFileName = "${module_name}-${rootProject.ext.versionName}-${variantLowered}.zip" def zipFileName = "${module_name}-${rootProject.ext.versionName}-${rootProject.ext.versionCode}-${variantLowered}.zip"
task("copyMainDex${variantCapped}", type: Copy) { task("copyMainDex${variantCapped}", type: Copy) {
def dexOutPath = variant.name.contains("release") ? def dexOutPath = variant.name.contains("release") ?