Skip to content

Commit 2f64613

Browse files
Update android-release_ci.yml
Signed-off-by: CreativeCodeCat <[email protected]>
1 parent 4c85748 commit 2f64613

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

.github/workflows/android-release_ci.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,35 @@ jobs:
6161
run: |
6262
shred -u app/mLauncher.jks || rm -f app/mLauncher.jks
6363
64+
- name: Detect build artifacts
65+
id: detect_artifacts
66+
shell: bash
67+
run: |
68+
set -e
69+
70+
APK=$(find app/build/outputs/apk -name "*.apk" -type f | head -n 1)
71+
AAB=$(find app/build/outputs/bundle -name "*.aab" -type f | head -n 1)
72+
MAPPING=$(find app/build/outputs/mapping -name "mapping.txt" -type f | head -n 1)
73+
74+
echo "Detected APK: $APK"
75+
echo "Detected AAB: $AAB"
76+
echo "Detected mapping: $MAPPING"
77+
78+
if [[ -z "$APK" || -z "$AAB" ]]; then
79+
echo "❌ APK or AAB not found"
80+
exit 1
81+
fi
82+
83+
echo "apk=$APK" >> "$GITHUB_OUTPUT"
84+
echo "aab=$AAB" >> "$GITHUB_OUTPUT"
85+
echo "mapping=$MAPPING" >> "$GITHUB_OUTPUT"
86+
87+
6488
- name: Release to GitHub
6589
uses: svenstaro/[email protected]
6690
with:
6791
repo_token: ${{ secrets.GITHUB_TOKEN }}
68-
file: app/build/outputs/apk/prob/release/app-prod-release.apk
92+
file: ${{ steps.detect_artifacts.outputs.apk }}
6993
asset_name: MultiLauncher-${{ github.ref_name }}-Signed.apk
7094
tag: ${{ github.ref }}
7195
overwrite: true
@@ -74,7 +98,7 @@ jobs:
7498
uses: svenstaro/[email protected]
7599
with:
76100
repo_token: ${{ secrets.GITHUB_TOKEN }}
77-
file: app/build/outputs/mapping/prodRelease/mapping.txt
101+
file: ${{ steps.detect_artifacts.outputs.mapping }}
78102
asset_name: MultiLauncher-${{ github.ref_name }}-mapping.txt
79103
tag: ${{ github.ref }}
80104
overwrite: true
@@ -83,7 +107,7 @@ jobs:
83107
uses: svenstaro/[email protected]
84108
with:
85109
repo_token: ${{ secrets.GITHUB_TOKEN }}
86-
file: app/build/outputs/bundle/prodRelease/app-prod-release.aab
110+
file: ${{ steps.detect_artifacts.outputs.aab }}
87111
asset_name: MultiLauncher-${{ github.ref_name }}-Signed.aab
88112
tag: ${{ github.ref }}
89113
overwrite: true

0 commit comments

Comments
 (0)