Skip to content

Frontend: Fix HalfOnionDomeContainers not considering status bar height #9

Frontend: Fix HalfOnionDomeContainers not considering status bar height

Frontend: Fix HalfOnionDomeContainers not considering status bar height #9

name: Deploy Flutter Frontend Apps
on:
push:
tags:
- 'v*'
paths:
- '.github/workflows/publish_frontend.yaml'
- 'core/**'
- 'frontend/**'
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Cache Flutter packages
uses: actions/cache@v4
with:
path: |
~/.pub-cache
frontend/.dart_tool
core/.dart_tool
key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-cache-
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.2'
channel: 'stable'
- name: Generate dotenv files
run: |
echo "BASE_URL=http://localhost:8080" > ./frontend/dotenv.dev
echo "BASE_URL=${{ secrets.BASE_URL }}" > ./frontend/dotenv.prod
- name: Get dependencies (frontend)
working-directory: ./frontend
run: flutter pub get
- name: Get dependencies (core)
working-directory: ./core
run: flutter pub get
- name: Run build_runner (core)
working-directory: ./core
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Run build_runner (frontend)
working-directory: ./frontend
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Decode Keystore
uses: timheuer/base64-to-file@v1.2
with:
fileName: 'keystore.jks'
fileDir: './frontend/android/app/'
encodedString: ${{ secrets.KEYSTORE_BASE64 }}
- name: Build APK
working-directory: ./frontend
env:
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: flutter build apk --release
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: release-apk
path: frontend/build/app/outputs/flutter-apk/app-release.apk
- name: Build web app
working-directory: ./frontend
run: flutter build web --dart-define APP_ENV=production --base-href /down_the_aisle/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./frontend/build/web
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: frontend/build/app/outputs/flutter-apk/app-release.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}