yubioath-flutter/.github/workflows/android.yaml

66 lines
1.6 KiB
YAML
Raw Normal View History

2022-03-09 19:27:24 +03:00
name: Android
2022-03-04 14:20:01 +03:00
2022-03-16 14:06:02 +03:00
on: [push, pull_request]
2022-03-04 14:20:01 +03:00
jobs:
2022-04-05 09:59:21 +03:00
build:
2022-04-04 18:13:01 +03:00
runs-on: ubuntu-latest
steps:
- name: set up JDK 11
2022-10-24 09:13:26 +03:00
uses: actions/setup-java@v3
2022-04-04 18:13:01 +03:00
with:
2022-10-24 09:13:26 +03:00
distribution: 'zulu'
2022-04-04 18:13:01 +03:00
java-version: '11'
- name: Install Flutter
uses: subosito/flutter-action@v2
2022-04-04 18:13:01 +03:00
with:
2022-05-12 09:36:47 +03:00
channel: 'stable'
2023-01-25 16:20:26 +03:00
flutter-version: '3.7.0'
2022-04-04 18:13:01 +03:00
- run: |
flutter config
flutter --version
- uses: actions/checkout@v3
2022-04-04 18:13:01 +03:00
with:
path: 'app'
- name: Check app versions
run: |
python set-version.py
git diff --exit-code
working-directory: ./app
2022-04-04 18:13:01 +03:00
- name: Run flutter tests
run: |
flutter test
flutter analyze
working-directory: ./app
- name: Build the App
2022-11-29 17:45:07 +03:00
run: android/scripts/build.sh
2022-04-04 18:13:01 +03:00
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
2022-04-04 18:13:01 +03:00
- name: Run android tests
2022-11-29 17:45:07 +03:00
run: ./gradlew test
2022-04-04 18:13:01 +03:00
working-directory: ./app/android
2022-11-29 17:45:07 +03:00
- name: Collect artifacts
run: android/scripts/collect-artifacts.sh ${GITHUB_REF}
2022-04-04 18:13:01 +03:00
working-directory: ./app
- uses: actions/upload-artifact@v3
2022-04-04 18:13:01 +03:00
with:
name: yubico-authenticator-android
path: app/artifacts/*