feat(ci): restore universal APK, set 7-day retention for artifacts, and clean workspace to save storage
This commit is contained in:
@@ -102,7 +102,14 @@ jobs:
|
|||||||
flutter analyze
|
flutter analyze
|
||||||
flutter test
|
flutter test
|
||||||
|
|
||||||
- name: Build Split-per-ABI Release APKs (3 APKs)
|
- name: Build Universal Release APK
|
||||||
|
run: |
|
||||||
|
flutter build apk --release || {
|
||||||
|
echo "Checking if APK was built despite path mismatch..."
|
||||||
|
find build android -type f -name "*release*.apk" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Build Split-per-ABI Release APKs
|
||||||
run: |
|
run: |
|
||||||
flutter build apk --release --split-per-abi || {
|
flutter build apk --release --split-per-abi || {
|
||||||
echo "Checking if split APKs were built despite path mismatch..."
|
echo "Checking if split APKs were built despite path mismatch..."
|
||||||
@@ -112,6 +119,13 @@ jobs:
|
|||||||
- name: Organize Artifacts
|
- name: Organize Artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release-apks
|
mkdir -p release-apks
|
||||||
|
# Copy universal APK
|
||||||
|
if [ -f build/app/outputs/flutter-apk/app-release.apk ]; then
|
||||||
|
cp build/app/outputs/flutter-apk/app-release.apk release-apks/oggauer-gemeindetrommler-universal.apk
|
||||||
|
elif [ -f android/app/build/outputs/apk/release/app-release.apk ]; then
|
||||||
|
cp android/app/build/outputs/apk/release/app-release.apk release-apks/oggauer-gemeindetrommler-universal.apk
|
||||||
|
fi
|
||||||
|
# Copy split APKs
|
||||||
for apk in build/app/outputs/flutter-apk/*.apk android/app/build/outputs/apk/release/*.apk; do
|
for apk in build/app/outputs/flutter-apk/*.apk android/app/build/outputs/apk/release/*.apk; do
|
||||||
[ -f "$apk" ] || continue
|
[ -f "$apk" ] || continue
|
||||||
case "$(basename "$apk")" in
|
case "$(basename "$apk")" in
|
||||||
@@ -120,29 +134,36 @@ jobs:
|
|||||||
*x86_64*) cp "$apk" release-apks/oggauer-gemeindetrommler-x86_64.apk ;;
|
*x86_64*) cp "$apk" release-apks/oggauer-gemeindetrommler-x86_64.apk ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
echo "=== Generated 3 Split APK Artifacts ==="
|
echo "=== Generated All 4 APK Artifacts ==="
|
||||||
ls -lah release-apks/
|
ls -lah release-apks/
|
||||||
|
|
||||||
|
- name: Upload Universal APK
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: oggauer-gemeindetrommler-universal
|
||||||
|
path: release-apks/oggauer-gemeindetrommler-universal.apk
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload ARM64 APK
|
- name: Upload ARM64 APK
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: oggauer-gemeindetrommler-arm64-v8a
|
name: oggauer-gemeindetrommler-arm64-v8a
|
||||||
path: release-apks/oggauer-gemeindetrommler-arm64-v8a.apk
|
path: release-apks/oggauer-gemeindetrommler-arm64-v8a.apk
|
||||||
retention-days: 30
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload ARMv7 APK
|
- name: Upload ARMv7 APK
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: oggauer-gemeindetrommler-armeabi-v7a
|
name: oggauer-gemeindetrommler-armeabi-v7a
|
||||||
path: release-apks/oggauer-gemeindetrommler-armeabi-v7a.apk
|
path: release-apks/oggauer-gemeindetrommler-armeabi-v7a.apk
|
||||||
retention-days: 30
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload x86_64 APK
|
- name: Upload x86_64 APK
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: oggauer-gemeindetrommler-x86_64
|
name: oggauer-gemeindetrommler-x86_64
|
||||||
path: release-apks/oggauer-gemeindetrommler-x86_64.apk
|
path: release-apks/oggauer-gemeindetrommler-x86_64.apk
|
||||||
retention-days: 30
|
retention-days: 7
|
||||||
|
|
||||||
- name: Publish Direct APKs to Gitea Releases
|
- name: Publish Direct APKs to Gitea Releases
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -153,3 +174,8 @@ jobs:
|
|||||||
RELEASE_TAG: latest
|
RELEASE_TAG: latest
|
||||||
run: |
|
run: |
|
||||||
node scripts/ci/publish_release.js
|
node scripts/ci/publish_release.js
|
||||||
|
|
||||||
|
- name: Clean Workspace Disk Space
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
rm -rf build android/.gradle release-apks 2>/dev/null || true
|
||||||
|
|||||||
@@ -102,7 +102,14 @@ jobs:
|
|||||||
flutter analyze
|
flutter analyze
|
||||||
flutter test
|
flutter test
|
||||||
|
|
||||||
- name: Build Split-per-ABI Release APKs (3 APKs)
|
- name: Build Universal Release APK
|
||||||
|
run: |
|
||||||
|
flutter build apk --release || {
|
||||||
|
echo "Checking if APK was built despite path mismatch..."
|
||||||
|
find build android -type f -name "*release*.apk" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Build Split-per-ABI Release APKs
|
||||||
run: |
|
run: |
|
||||||
flutter build apk --release --split-per-abi || {
|
flutter build apk --release --split-per-abi || {
|
||||||
echo "Checking if split APKs were built despite path mismatch..."
|
echo "Checking if split APKs were built despite path mismatch..."
|
||||||
@@ -112,6 +119,13 @@ jobs:
|
|||||||
- name: Organize Artifacts
|
- name: Organize Artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release-apks
|
mkdir -p release-apks
|
||||||
|
# Copy universal APK
|
||||||
|
if [ -f build/app/outputs/flutter-apk/app-release.apk ]; then
|
||||||
|
cp build/app/outputs/flutter-apk/app-release.apk release-apks/oggauer-gemeindetrommler-universal.apk
|
||||||
|
elif [ -f android/app/build/outputs/apk/release/app-release.apk ]; then
|
||||||
|
cp android/app/build/outputs/apk/release/app-release.apk release-apks/oggauer-gemeindetrommler-universal.apk
|
||||||
|
fi
|
||||||
|
# Copy split APKs
|
||||||
for apk in build/app/outputs/flutter-apk/*.apk android/app/build/outputs/apk/release/*.apk; do
|
for apk in build/app/outputs/flutter-apk/*.apk android/app/build/outputs/apk/release/*.apk; do
|
||||||
[ -f "$apk" ] || continue
|
[ -f "$apk" ] || continue
|
||||||
case "$(basename "$apk")" in
|
case "$(basename "$apk")" in
|
||||||
@@ -120,26 +134,38 @@ jobs:
|
|||||||
*x86_64*) cp "$apk" release-apks/oggauer-gemeindetrommler-x86_64.apk ;;
|
*x86_64*) cp "$apk" release-apks/oggauer-gemeindetrommler-x86_64.apk ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
echo "=== Generated 3 Split APK Artifacts ==="
|
echo "=== Generated All 4 APK Artifacts ==="
|
||||||
ls -lah release-apks/
|
ls -lah release-apks/
|
||||||
|
|
||||||
|
- name: Upload Universal APK
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: oggauer-gemeindetrommler-universal
|
||||||
|
path: release-apks/oggauer-gemeindetrommler-universal.apk
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload ARM64 APK
|
- name: Upload ARM64 APK
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: oggauer-gemeindetrommler-arm64-v8a
|
name: oggauer-gemeindetrommler-arm64-v8a
|
||||||
path: release-apks/oggauer-gemeindetrommler-arm64-v8a.apk
|
path: release-apks/oggauer-gemeindetrommler-arm64-v8a.apk
|
||||||
retention-days: 30
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload ARMv7 APK
|
- name: Upload ARMv7 APK
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: oggauer-gemeindetrommler-armeabi-v7a
|
name: oggauer-gemeindetrommler-armeabi-v7a
|
||||||
path: release-apks/oggauer-gemeindetrommler-armeabi-v7a.apk
|
path: release-apks/oggauer-gemeindetrommler-armeabi-v7a.apk
|
||||||
retention-days: 30
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload x86_64 APK
|
- name: Upload x86_64 APK
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: oggauer-gemeindetrommler-x86_64
|
name: oggauer-gemeindetrommler-x86_64
|
||||||
path: release-apks/oggauer-gemeindetrommler-x86_64.apk
|
path: release-apks/oggauer-gemeindetrommler-x86_64.apk
|
||||||
retention-days: 30
|
retention-days: 7
|
||||||
|
|
||||||
|
- name: Clean Workspace Disk Space
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
rm -rf build android/.gradle release-apks 2>/dev/null || true
|
||||||
|
|||||||
Reference in New Issue
Block a user