-
Notifications
You must be signed in to change notification settings - Fork 332
98 lines (81 loc) · 2.39 KB
/
build_deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Publish package to pub.dev
on:
push:
tags:
- "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
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- run: flutter --version
- 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
- name: Build Flutter
working-directory: ./example
run: >-
flutter
build ${{ matrix.platform }}
${{ env.FLUTTER_EXTRA_PARAMS }}
- name: Build iOS IPA with Fastlane
if: matrix.platform == 'ios'
uses: maierj/[email protected]
with:
lane: ${{ env.FASTLANE_BUILD_LANE }}
subdirectory: "ios"
publish:
name: Publish Plugin
runs-on: ubuntu-latest
permissions:
id-token: write
needs: build_example
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- run: flutter --version
- run: flutter pub get
- name: Publish package
run: flutter pub publish --force