Migrate project to kmp #10
Workflow file for this run
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: Android Tests | |
on: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Decode Keystore | |
env: | |
ENCODED_STRING: ${{ secrets.KEYSTORE_BASE_64 }} | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
run: | | |
echo $ENCODED_STRING > keystore-b64.txt | |
base64 -d keystore-b64.txt > Keystore | |
- name: Build Release apk and aab | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
run: ./gradlew assembleRelease bundleRelease --stacktrace | |
- name: List files | |
run: ls composeApp/build | |
- name: Print | |
run: pwd | |
- name: Upload APK to Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-release.apk | |
path: composeApp/release/composeApp-release.apk | |
- name: Upload AAB to Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-release.aab | |
path: composeApp/release/composeApp-release.aab | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Run Unit Tests | |
run: ./gradlew test |