forked from upstream-mirrors/quik
Automate CI/CD, document fork features, and format messages
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
name: Build and Release APK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
tags: [ 'v*' ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
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: ./gradlew assembleDebug
|
||||
|
||||
- name: Build Release APK
|
||||
run: ./gradlew assembleRelease
|
||||
|
||||
- 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."
|
||||
Reference in New Issue
Block a user