Skip to content

Commit 3f48524

Browse files
Fix release workflow to upload signed Android APK
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/889cf07f-39f1-4d9f-9240-efd8b66dcec9 Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent f1a8590 commit 3f48524

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,20 @@ jobs:
120120
run: |
121121
if [ "${{ steps.keystore.outputs.has_keystore }}" == "true" ]; then
122122
CONFIG="Release"
123+
APK=$(find "osu.Android/bin/$CONFIG/net10.0-android/publish" -maxdepth 1 -name "*-Signed.apk" 2>/dev/null | head -1)
124+
if [ -z "$APK" ]; then
125+
APK=$(find "osu.Android/bin/$CONFIG" -name "*-Signed.apk" | head -1)
126+
fi
123127
else
124128
CONFIG="Debug"
129+
APK=$(find "osu.Android/bin/$CONFIG/net10.0-android/publish" -maxdepth 1 -name "*.apk" 2>/dev/null | head -1)
130+
if [ -z "$APK" ]; then
131+
APK=$(find "osu.Android/bin/$CONFIG" -name "*.apk" | head -1)
132+
fi
125133
fi
126-
PUBLISH_DIR="osu.Android/bin/$CONFIG/net10.0-android/publish"
127-
APK=$(find "$PUBLISH_DIR" -maxdepth 1 -name "*.apk" 2>/dev/null | head -1)
128134
if [ -z "$APK" ]; then
129-
APK=$(find "osu.Android/bin/$CONFIG" -name "*.apk" | head -1)
135+
echo "Failed to locate expected APK for CONFIG=$CONFIG" >&2
136+
exit 1
130137
fi
131138
echo "apk_path=$APK" >> "$GITHUB_OUTPUT"
132139

0 commit comments

Comments
 (0)