Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 0 additions & 102 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,113 +5,11 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+*"

jobs:
build_example:
name: Build Example App
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: true
matrix:
platform:
- apk
- ios
os:
- ubuntu-latest
- macos-latest
exclude:
# Skip build combinations where Android is attempted to build on MacOS
# and iOS attempt to build on Ubuntu.
- os: macos-latest
platform: apk
- os: ubuntu-latest
platform: ios

# TODO(Dennis): iOS builds aren't properly configured yet. Fix and
# uncomment this exclusion
# https://github.com/oddbit/flutter_facebook_app_events/actions/runs/3365684172/jobs/5581387481
- platform: ios

steps:
- uses: actions/checkout@v4

# Ensure a compatible JDK for modern Android Gradle Plugin
- name: Set up Java 17
if: matrix.platform == 'apk'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true

- run: flutter --version

# Resolve root package (plugin) dependencies
- name: Flutter pub get (root)
run: flutter pub get

# Resolve example app dependencies explicitly
- name: Flutter pub get (example)
if: matrix.platform == 'apk'
working-directory: ./example
run: flutter pub get

- name: Configure iOS build environment
if: matrix.platform == 'ios'
run: |
echo "FLUTTER_EXTRA_PARAMS=--no-codesign" >> $GITHUB_ENV

- name: Activate iOS Pods Cache
uses: actions/cache@v4
if: matrix.platform == 'ios'
with:
path: example/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: ${{ runner.os }}-pods-

- run: flutter doctor

# Start from a clean state to avoid watcher/gradle cache oddities
- name: Flutter clean (example)
if: matrix.platform == 'apk'
working-directory: ./example
run: flutter clean

- name: Build Flutter
working-directory: ./example
run: >-
flutter
build ${{ matrix.platform }}
${{ env.FLUTTER_EXTRA_PARAMS }}

# Help verify Android outputs and surface them as artifacts
- name: List Android outputs
if: matrix.platform == 'apk'
working-directory: ./example
run: |
echo "Listing build/app/outputs:"
ls -R build/app/outputs || true

- name: Upload APK artifact
if: matrix.platform == 'apk'
uses: actions/upload-artifact@v4
with:
name: example-apk
path: |
example/build/app/outputs/flutter-apk/*.apk
example/build/app/outputs/apk/**/*.apk
example/build/**/outputs/**/*.apk

publish:
name: Publish Plugin
runs-on: ubuntu-latest
permissions:
id-token: write
needs: build_example
steps:
- uses: actions/checkout@v4

Expand Down
Loading