Last review touches #212
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: Build CI | |
on: | |
# Triggers the workflow on push or pull request events but only for the default branch | |
push: | |
branches: [ main ] | |
jobs: | |
analysis: | |
name: Analysis | |
# This job will run on ubuntu virtual machine | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup flutter environment | |
uses: subosito/[email protected] | |
with: | |
channel: 'stable' # 'dev', 'alpha', default to: 'stable' | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Analyse ui library | |
run: flutter analyze | |
- name: Analyse logic library | |
run: | | |
cd ./logic | |
flutter analyze | |
build: | |
name: Build | |
needs: analysis | |
# This job will run on ubuntu virtual machine | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup java environment | |
uses: actions/[email protected] | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Recreate signing key from environment variable | |
run: echo $SIGNING_KEY | base64 -d > android/app/key.jks | |
env: | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
- name: Setup flutter environment | |
uses: subosito/[email protected] | |
with: | |
channel: 'stable' # 'dev', 'alpha', default to: 'stable' | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Generate localisation files | |
run: flutter gen-l10n | |
- name: Build apk | |
run: flutter build apk | |
env: | |
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
ALIAS: ${{ secrets.ALIAS }} | |
KEY_PATH: key.jks | |
- name: Upload generated apk to the artifacts | |
uses: actions/[email protected] | |
with: | |
name: release-apk | |
path: build/app/outputs/apk/release/app-release.apk | |
retention-days: 5 |