Booking enhancements #74
Workflow file for this run
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 dev artefacts | |
on: | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
ref: | |
required: false | |
type: string | |
pull_request: | |
jobs: | |
build: | |
name: Build ${{ matrix.name }} | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
include: | |
- target: 'apk --debug --flavor=dev' | |
name: 'APK' | |
path: build/app/outputs/flutter-apk/app-dev-debug.apk | |
- target: 'web' | |
name: 'Web' | |
path: build/web/ | |
steps: | |
- name: Determine ref | |
id: get-ref | |
run: | | |
input_ref=${{ inputs.ref }} | |
github_ref=${{ github.sha }} | |
ref=${input_ref:-$github_ref} | |
echo ref=$ref >> $GITHUB_OUTPUT | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ steps.get-ref.outputs.ref }} | |
- name: Setup Java | |
if: matrix.name == 'APK' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11.x' | |
cache: 'gradle' | |
- name: Setup Flutter SDK | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: '3.13' | |
cache: true | |
- name: Cleanup 🧹 | |
run: flutter clean | |
- name: Get Packages | |
run: flutter pub get | |
- name: Configure Dev env | |
run: | | |
echo THE_MOVIE_DB_API=$THE_MOVIE_DB_API >> .env | |
echo DEBUG_HOST=$DEBUG_HOST >> .env | |
echo RELEASE_HOST=$RELEASE_HOST >> .env | |
env: | |
THE_MOVIE_DB_API: ${{ secrets.THE_MOVIE_DB_API }} | |
DEBUG_HOST: ${{ secrets.DEBUG_HOST }} | |
RELEASE_HOST: ${{ secrets.DEBUG_HOST }} | |
- name: Add Firebase configuration for Dev | |
run: | | |
echo $GOOGLE_SERVICES_DEV_JSON_BASE64 | base64 -D -o android/app/src/dev/google-services.json | |
env: | |
GOOGLE_SERVICES_DEV_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_DEV_JSON_BASE64 }} | |
- name: Set Dev icons | |
run: | | |
rm assets/images/icon.png | |
mv assets/images/icon_dev.png assets/images/icon.png | |
rm assets/images/logo.png | |
mv assets/images/logo_dev.png assets/images/logo.png | |
- name: Build Dev 🔧 | |
run: flutter build ${{ matrix.target }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: titan-debug-${{ matrix.name }} | |
path: ${{ matrix.path }} | |
if-no-files-found: ignore |