File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed
Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -138,16 +138,24 @@ jobs:
138138 COMMIT_ID : ${{ github.event.head_commit.id }}
139139 run : |
140140 if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
141- for APK_FILE in "${{ steps.sign_release_app.outputs.signedReleaseFile }}" "${{ steps.sign_debug_app.outputs.signedReleaseFile }}"
142- do
143- if [ -f "$APK_FILE" ]; then
144- FILENAME=$(basename "$APK_FILE")
145- for GROUP_ID in "-1002058433411" "-1001910818234"
146- do
147- URL=$(python3 .github/scripts/telegram_url.py $GROUP_ID)
148- curl -v "$URL" -F document=@"$APK_FILE" -F caption="$FILENAME"
149- done
150- fi
141+ OUTPUT_DIRS=(
142+ "app/build/outputs/apk/release"
143+ "app/build/outputs/apk/debug"
144+ )
145+ for OUTPUT_DIR in "${OUTPUT_DIRS[@]}"; do
146+ if [ -d "$OUTPUT_DIR" ]; then
147+ # 查找APK文件
148+ APK_FILE=$(find "$OUTPUT_DIR" -name "*.apk" | head -n 1)
149+
150+ if [ ! -z "$APK_FILE" ] && [ -f "$APK_FILE" ]; then
151+ echo "Found APK: $APK_FILE"
152+
153+ for GROUP_ID in "-1002058433411" "-1001910818234"; do
154+ URL=$(python3 .github/scripts/telegram_url.py $GROUP_ID)
155+ curl -v "$URL" -F Release=@"$APK_FILE"
156+ done
157+ fi
158+ fi
151159 done
152160 fi
153161
You can’t perform that action at this time.
0 commit comments