Skip to content

Update build.gradle.kts #21

Update build.gradle.kts

Update build.gradle.kts #21

Workflow file for this run

name: Build APK
on: [push]
jobs:
build:
name: Build and push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: "Setup Gradle"
uses: gradle/gradle-build-action@v2
- name: "Grant execution permission"
run: chmod +x ./gradlew
- name: "Build APKs"
run: ./gradlew build
- name: "Setup directories"
run: |
mkdir -p /tmp/pyonbuild/apks
mkdir -p /tmp/pyonbuild/tools
- name: "Move debug APK"
run: mv ./app/build/outputs/apk/debug/app-debug.apk /tmp/pyonbuild/apks
- name: "Download uber-apk-signer"
run: wget -nv "https://github.com/patrickfav/uber-apk-signer/releases/download/v1.2.1/uber-apk-signer-1.2.1.jar" -O /tmp/pyonbuild/tools/uber-apk-signer.jar
- name: "Sign release APK"
run: java -jar /tmp/pyonbuild/tools/uber-apk-signer.jar --apks ./app/build/outputs/apk/release/app-release-unsigned.apk --out /tmp/pyonbuild/apks/
- name: "Rename release APK"
run: mv /tmp/pyonbuild/apks/app-release-aligned-debugSigned.apk /tmp/pyonbuild/apks/app-release.apk
- name: "Upload debug APK"
uses: actions/upload-artifact@v3
with:
name: app-debug
path: /tmp/pyonbuild/apks/app-debug.apk
- name: "Upload release APK"
uses: actions/upload-artifact@v3
with:
name: app-release
path: /tmp/pyonbuild/apks/app-release.apk