Files
quik/.gitea/workflows/build.yml
T
karol fe172ac682
Build and Release APK / Build APK (push) Failing after 10m32s
Build and Release APK / Create Gitea Release (push) Has been skipped
Add robust retry logic for Gradle downloads
2026-09-18 15:04:29 +02:00

78 lines
2.1 KiB
YAML

name: Build and Release APK
on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
container:
image: mingc/android-build-box:latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Restore Gradle Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Debug APK
run: |
for i in 1 2 3; do
./gradlew assembleDebug && exit 0 || { echo "Attempt $i failed, retrying in 30s..."; sleep 30; }
done
exit 1
- name: Build Release APK
run: |
for i in 1 2 3; do
./gradlew assembleRelease && exit 0 || { echo "Attempt $i failed, retrying in 30s..."; sleep 30; }
done
exit 1
- name: Upload Debug APK Artifact
uses: actions/upload-artifact@v3
with:
name: Quik-Debug-APK
path: presentation/build/outputs/apk/debug/*.apk
- name: Upload Release APK Artifact
uses: actions/upload-artifact@v3
with:
name: Quik-Release-APK
path: presentation/build/outputs/apk/release/*.apk
release:
name: Create Gitea Release
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "Quik-Debug-APK/*.apk,Quik-Release-APK/*.apk"
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ github.ref_name }}
body: "Automated release of Quik Fork with Remotrix integration."