Files
quik/.gitea/workflows/build.yml
T
karol 30c9971ef6
Build and Release APK / Build APK (push) Successful in 1m3s
Build and Release APK / Create Gitea Release (push) Successful in 7s
Make release step run on every push (Rolling Latest Release)
2026-09-18 18:11:13 +02:00

80 lines
2.2 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
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 }}
tag: "latest"
name: "Latest Build"
body: "Automated release of Quik Fork with Remotrix integration. Generated from the latest push."
allowUpdates: true
makeLatest: true