Skip to content

Commit 93bfd8c

Browse files
committed
Standardized artifact naming: [app name]-[version]-[build type]
1 parent cddf9d9 commit 93bfd8c

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/release-manual.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,21 @@ jobs:
9595
- name: Prepare release files
9696
run: |
9797
mkdir -p release-artifacts
98-
cp android/app/libs/masterdnsvpn.aar release-artifacts/
99-
cp android/app/build/outputs/apk/release/*.apk release-artifacts/
98+
APP_NAME="masterdnsvpn"
99+
VERSION_NAME="${ANDROID_VERSION_NAME}"
100+
101+
cp android/app/libs/masterdnsvpn.aar release-artifacts/${APP_NAME}-${VERSION_NAME}-release.aar
102+
103+
for apk in android/app/build/outputs/apk/release/*.apk; do
104+
filename=$(basename "$apk")
105+
if [[ "$filename" == "app-universal-release.apk" ]]; then
106+
suffix="universal"
107+
else
108+
suffix=$(echo "$filename" | sed -E 's|^app-(.*)-release\.apk$|\1|')
109+
fi
110+
cp "$apk" "release-artifacts/${APP_NAME}-${VERSION_NAME}-${suffix}-release.apk"
111+
done
112+
100113
ls -la release-artifacts
101114
102115
- name: Create GitHub Release

0 commit comments

Comments
 (0)