Skip to content
代码片段 群组 项目
提交 d302649a 编辑于 作者: ling zhang's avatar ling zhang
浏览文件

ci: #92 Gets the original file name of the apk in build stage

上级 c197b961
No related branches found
No related tags found
无相关合并请求
......@@ -38,7 +38,9 @@ build-android:
- VERSION_APK=$(/opt/android-sdk-linux/build-tools/30.0.3/aapt2 dump badging ${ANDROID_APK_PATH} | grep "versionName" | sed -e "s/.*versionName='//" -e "s/' .*//")
- FILENAME_APK=$(ls | grep 'apk')
- echo "VERSION_APK=$VERSION_APK" > version.env
- echo "FILENAME_APK=$FILENAME_APK" > version.env
- echo "FILENAME_APK=$FILENAME_APK" >> version.env
- echo $VERSION_APK
- echo $FILENAME_APK
artifacts:
name: "android-apk"
paths:
......@@ -56,8 +58,6 @@ build-ios:
upload-apk:
stage: deploy
script:
- echo $VERSION_APK
- echo $FILENAME_APK
- 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${ANDROID_APK_PATH} "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jihu-gitlab-app/${VERSION_APK}/${FILENAME_APK}"'
only:
- main
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册