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

70 lines
1.8 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:
2024-07-04 14:51:24 +03:00
- name: Set up JDK 17
2023-12-04 16:35:14 +03:00
uses: actions/setup-java@v4
2022-04-04 18:13:01 +03:00
with:
2023-09-06 15:36:46 +03:00
distribution: 'temurin'
java-version: '17'
2022-04-04 18:13:01 +03:00
- uses: actions/checkout@v4
with:
path: 'app'
- name: Read variables from repo
run: cat .github/workflows/env >> $GITHUB_ENV
working-directory: ./app
2022-04-04 18:13:01 +03:00
- 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'
flutter-version: ${{ env.FLUTTER }}
2022-04-04 18:13:01 +03:00
- run: |
flutter config
flutter --version
- 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@v4
2022-04-04 18:13:01 +03:00
with:
name: yubico-authenticator-android
path: app/artifacts/*