更新工作流
This commit is contained in:
@@ -89,30 +89,12 @@ jobs:
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Build With Gradle
|
||||
continue-on-error: true
|
||||
run: |
|
||||
echo "统一版本号"
|
||||
sed "/def version/c def version = \"${{ env.VERSION }}\"" $GITHUB_WORKSPACE/app/build.gradle -i
|
||||
sed "/def version/c def version = \"${{ env.VERSION }}\"" $GITHUB_WORKSPACE/app/build.gradle -i
|
||||
echo "开始${{ env.product }}${{ env.type }}构建"
|
||||
chmod +x gradlew
|
||||
./gradlew assemble${{ env.product }}Release
|
||||
echo "修改APK文件名"
|
||||
mkdir -p ${{ github.workspace }}/apk/
|
||||
for file in ${{ github.workspace }}/app/app/release/*-release.apk; do
|
||||
filename=$(basename "$file")
|
||||
if [[ "$filename" == *"armeabi-v7a"* ]]; then
|
||||
mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_${{ env.type }}_32.apk
|
||||
elif [[ "$filename" == *"arm64-v8a"* ]]; then
|
||||
mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_${{ env.type }}_64.apk
|
||||
elif [[ "$filename" == *"universal"* ]]; then
|
||||
mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_${{ env.type }}_universal.apk
|
||||
fi
|
||||
done
|
||||
echo "移动mapping文件"
|
||||
mkdir -p ${{ github.workspace }}/mapping/
|
||||
for file in `ls ${{ github.workspace }}/app/build/outputs/mapping/*/mapping.txt`; do
|
||||
mv "$file" ${{ github.workspace }}/mapping/mapping.txt
|
||||
done
|
||||
|
||||
- name: Move Missing Rules Files
|
||||
run: |
|
||||
@@ -131,33 +113,20 @@ jobs:
|
||||
|
||||
- name: Check Build production
|
||||
run: |
|
||||
if [ ! -d ${{ github.workspace }}/apk ]; then
|
||||
echo "Build production not found! Check gradle logs."
|
||||
exit 1
|
||||
fi
|
||||
cd ${{ github.workspace }}/apk/
|
||||
if [ ! -e legado_*.apk ]; then
|
||||
if ! ls $GITHUB_WORKSPACE/app/app/release/*-release.apk 1> /dev/null 2>&1; then
|
||||
echo "Build production not found! Check gradle logs."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload 32-bit APK
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: legado.${{ env.product }}.${{ env.type }}.apk.32
|
||||
path: ${{ github.workspace }}/apk/*_32.apk
|
||||
name: APKs
|
||||
path: |
|
||||
${{ github.workspace }}/app/app/release/*-armeabi-v7a-release.apk
|
||||
${{ github.workspace }}/app/app/release/*-arm64-v8a-release.apk
|
||||
${{ github.workspace }}/app/app/release/*-universal-release.apk
|
||||
|
||||
- name: Upload 64-bit APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: legado.${{ env.product }}.${{ env.type }}.apk.64
|
||||
path: ${{ github.workspace }}/apk/*_64.apk
|
||||
|
||||
- name: Upload Universal APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: legado.${{ env.product }}.${{ env.type }}.apk.universal
|
||||
path: ${{ github.workspace }}/apk/*_universal.apk
|
||||
|
||||
- name: Upload Mapping File To Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user