2024-01-16 09:36:59 +01:00
|
|
|
name: "New APK"
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-android-app:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: "Set up JDK 17"
|
|
|
|
id: setup-java
|
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: '17'
|
|
|
|
- name: "Prepare env"
|
|
|
|
run: |
|
|
|
|
echo ${{ secrets.KEYSTORE_B64 }} | base64 -d | zcat >> androidApp/keyguard-release.keystore
|
|
|
|
echo ${{ secrets.KEYSTORE_PROPS_B64 }} | base64 -d | zcat >> androidApp/keyguard-release.properties
|
|
|
|
echo ${{ secrets.GOOGLE_SERVICES }} | base64 -d | zcat >> androidApp/google-services.json
|
|
|
|
echo "" >> gradle.properties
|
2024-01-24 08:46:14 +01:00
|
|
|
echo "versionRef=$(git rev-parse --short HEAD)" >> gradle.properties
|
2024-01-16 09:36:59 +01:00
|
|
|
echo buildkonfig.flavor=release >> gradle.properties
|
2024-08-08 06:32:06 +02:00
|
|
|
- name: "Setup Gradle"
|
2024-08-08 06:26:01 +02:00
|
|
|
uses: gradle/actions/setup-gradle@v4
|
2024-01-16 09:36:59 +01:00
|
|
|
env:
|
|
|
|
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
|
2024-08-08 06:32:06 +02:00
|
|
|
- name: "Check and Build licenses"
|
|
|
|
run: ./gradlew :androidApp:licenseeAndroidNoneRelease
|
2024-01-16 09:36:59 +01:00
|
|
|
- name: "Move licenses"
|
|
|
|
run: |
|
2024-05-25 12:04:50 +02:00
|
|
|
mv -f androidApp/build/reports/licensee/androidNoneRelease/artifacts.json common/src/commonMain/composeResources/files/licenses.json
|
2024-07-14 14:25:06 +02:00
|
|
|
- name: "Build"
|
|
|
|
run: ./gradlew :androidApp:assembleNoneRelease
|
2024-01-16 09:36:59 +01:00
|
|
|
- name: 'Upload .apk'
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: app-android
|
|
|
|
path: |
|
|
|
|
androidApp/build/outputs/apk/**/*.apk
|
|
|
|
androidApp/build/outputs/mapping/**/mapping.txt
|
|
|
|
retention-days: 7
|