mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-25 19:21:38 +03:00
68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
name: Android
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: set up JDK 11
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: '11'
|
|
|
|
- name: Install Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: 'stable'
|
|
- run: |
|
|
flutter config
|
|
flutter --version
|
|
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
path: 'app'
|
|
|
|
- name: Check app versions
|
|
run: |
|
|
python set-version.py
|
|
git diff --exit-code
|
|
working-directory: ./app
|
|
|
|
- name: Run flutter tests
|
|
run: |
|
|
flutter test
|
|
flutter analyze
|
|
working-directory: ./app
|
|
|
|
- name: Build the App
|
|
run: flutter build apk --release
|
|
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
|
|
|
|
- name: Check generated files
|
|
run: git diff --exit-code
|
|
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-release.apk artifacts/yubico-authenticator-${REF}.apk
|
|
working-directory: ./app
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: yubico-authenticator-android
|
|
path: app/artifacts/*
|