-
Notifications
You must be signed in to change notification settings - Fork 1
110 lines (93 loc) · 3.26 KB
/
pr.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
99
100
101
102
103
104
105
106
107
108
109
110
name: Pull Request
on:
pull_request:
branches: [ 'develop' ]
workflow_dispatch:
inputs:
ios-runner-type:
type: choice
required: true
description: "Runner type"
default: "self-hosted"
options:
- "self-hosted"
- "macos-13"
env:
BUILD_TYPE: 'SNAPSHOT' # Allowed values: 'SNAPSHOT', 'RELEASE', 'RELEASE_CANDIDATE'
FLUTTER_VERSION: '3.19.0'
XCODE_VERSION: '15.4'
JAVA_VERSION: '11'
RUBY_VERSION: '3.1'
HOST_NAME: ${{ secrets.HOST_NAME }}
PRIVATE_REPOSITORY_API_KEY: ${{ secrets.PRIVATE_REPOSITORY_API_KEY }}
PRIVATE_DART_REPOSITORY: ${{ secrets.PRIVATE_DART_REPOSITORY }}
PRIVATE_NATIVE_IOS_REPOSITORY: ${{ secrets.PRIVATE_NATIVE_IOS_REPOSITORY }}
PRIVATE_NATIVE_ANDROID_REPOSITORY: ${{ secrets.PRIVATE_NATIVE_ANDROID_REPOSITORY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }}
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
CURRENT_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
jobs:
flutter-validation:
name: Validate Flutter
runs-on: ubuntu-latest
outputs:
sdk-version: ${{ steps.get-versions.outputs.sdk-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch SDK Version
id: get-versions
uses: ./.github/actions/get-versions
- name: Setup Flutter
uses: ./.github/actions/setup-flutter
- name: Update Flutter dependencies
uses: ./.github/actions/update-flutter-dependencies
with:
sdk-version: ${{ steps.get-versions.outputs.sdk-version }}
- name: Validate Flutter
uses: ./.github/actions/validate-flutter
ios-build:
name: Building iOS App
runs-on: ${{ github.event.inputs.ios-runner-type || 'self-hosted' }}
needs: [flutter-validation]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: ./.github/actions/setup-flutter
- name: Update Flutter Dependencies
uses: ./.github/actions/update-flutter-dependencies
with:
sdk-version: ${{ needs.flutter-validation.outputs.sdk-version }}
- name: Setup iOS Environment
uses: ./.github/actions/setup-ios
- name: Build iOS Example App
env:
PRIVATE_NATIVE_REPOSITORY: ${{ env.PRIVATE_NATIVE_IOS_REPOSITORY }}
uses: maierj/[email protected]
with:
lane: 'pr'
subdirectory: 'ios'
android-build:
name: Building Android App
runs-on: ubuntu-latest
needs: [flutter-validation]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: ./.github/actions/setup-flutter
- name: Update Flutter Dependencies
uses: ./.github/actions/update-flutter-dependencies
with:
sdk-version: ${{ needs.flutter-validation.outputs.sdk-version }}
- name: Setup Android Environment
uses: ./.github/actions/setup-android
- name: Build Android Example App
env:
PRIVATE_NATIVE_REPOSITORY: ${{ env.PRIVATE_NATIVE_ANDROID_REPOSITORY }}
uses: maierj/[email protected]
with:
lane: 'pr'
subdirectory: 'android'