fix android action

This commit is contained in:
Adam Velebil 2022-04-04 17:39:01 +02:00
parent d6eb470ce2
commit 56c52bba6d
No known key found for this signature in database
GPG Key ID: AC6D6B9D715FC084

View File

@ -3,67 +3,7 @@ name: Android
on: [push, pull_request]
jobs:
build-debug:
name: Debug apk
runs-on: ubuntu-latest
steps:
- name: Checkout Yubikit Next
uses: actions/checkout@v2
with:
repository: Yubico/yubikit-android
ref: next
path: kit
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Build Yubikit-android
run: ./gradlew --stacktrace check test build javadocJar publishToMavenLocal
working-directory: ./kit
- name: Install Flutter
uses: subosito/flutter-action@v1
with:
channel: 'beta'
- run: |
flutter config
flutter --version
- uses: actions/checkout@v2
with:
path: 'app'
- name: Run flutter tests
run: |
flutter test
flutter analyze
working-directory: ./app
- name: Build the App
run: flutter build apk --debug
working-directory: ./app
- name: Run android tests
run: |
./gradlew test
working-directory: ./app/android
- name: Upload artifacts
run: |
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3,4,5,6,7 | sed -r 's/\//_/g')
mkdir artifacts
mv build/app/outputs/flutter-apk/app-debug.apk artifacts/yubico-authenticator-debug-${REF}.apk
working-directory: ./app
- uses: actions/upload-artifact@v2
with:
name: yubico-authenticator-android
path: app/artifacts/*
build-release:
build-debug build-release:
name: Release apk
runs-on: ubuntu-latest
@ -114,6 +54,11 @@ jobs:
- name: Run android tests
run: |
./gradlew test
env:
YUBIOATH_STORE_BASE64: ${{ secrets.YUBIOATH_STORE_BASE64 }}
YUBIOATH_KEY_ALIAS: ${{ secrets.YUBIOATH_KEY_ALIAS }}
YUBIOATH_KEY_PASSWORD: ${{ secrets.YUBIOATH_KEY_PASSWORD }}
YUBIOATH_STORE_PASSWORD: ${{ secrets.YUBIOATH_STORE_PASSWORD }}
working-directory: ./app/android
- name: Upload artifacts