[general] Bunny-fication #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |