Skip to content
Merged

wf #1

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/cachelio-debug-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Cachelio Debug APK

on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:

jobs:
build:
name: Build debug APK
runs-on: ubuntu-latest
timeout-minutes: 45

env:
SIGNING_KEYSTORE_BASE64: ${{ secrets.SIGNING_KEYSTORE_BASE64 }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Write local.properties
run: echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Decode signing keystore
id: signing
if: env.SIGNING_KEYSTORE_BASE64 != ''
run: |
echo "$SIGNING_KEYSTORE_BASE64" | base64 --decode > "$RUNNER_TEMP/vbrowser.jks"
echo "keystore=$RUNNER_TEMP/vbrowser.jks" >> "$GITHUB_OUTPUT"

- name: Build debug APK
env:
VBROWSER_KEYSTORE: ${{ steps.signing.outputs.keystore }}
VBROWSER_STORE_PASSWORD: ${{ env.SIGNING_STORE_PASSWORD }}
VBROWSER_KEY_ALIAS: ${{ env.SIGNING_KEY_ALIAS }}
VBROWSER_KEY_PASSWORD: ${{ env.SIGNING_KEY_PASSWORD }}
run: ./gradlew :app:assembleDebug --no-daemon --stacktrace

- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: cachelio-debug-apk
path: app/build/outputs/apk/debug/*.apk
if-no-files-found: error
retention-days: 30
Loading