Skip to content

Update README.md

Update README.md #104

Workflow file for this run

name: Android build on main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test source code
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Load Gradle from cache
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: gradle
- name: Run tests
run: ./gradlew testDebugUnitTest --continue --stacktrace
- name: Upload reports
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: test-reports
path:
./app/build/reports/tests/**
lint:
name: Lint source code
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Load Gradle from cache
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: gradle
- name: Run linting
run: ./gradlew lintDebug --stacktrace
- name: Upload reports
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lint-reports
path:
./app/build/reports/lint*
build:
name: Build APK
needs: [test, lint]
runs-on: ubuntu-latest
env:
VERSION_CODE: ${{ github.run_id }}
VERSION_SUFFIX: SNAPSHOT
steps:
- uses: actions/checkout@v3
- name: Load Gradle from cache
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: gradle
- id: appVersion
run: echo "::set-output name=VERSION::$(./gradlew -q printVersion)"
- name: Build APK
id: buildApk
run: ./gradlew assembleRelease --stacktrace
- name: Sign APK
id: signApk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: ./app/build/outputs/apk/release
alias: ${{ secrets.ALIAS }}
signingKeyBase64: ${{ secrets.KEYSTORE }}
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.PASSWORD }}
env:
BUILD_TOOLS_VERSION: 30.0.3
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-${{ steps.appVersion.outputs.version }}
path: |
./app/build/outputs/apk/release/**.apk
./app/release/**.apk