-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathaction.yml
More file actions
74 lines (59 loc) · 2.24 KB
/
action.yml
File metadata and controls
74 lines (59 loc) · 2.24 KB
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
name: Android road test (selected RN app & AndroidApp)
description: Package the given RN app as AAR, publish to Maven Local, and build the corresponding AndroidApp flavor
inputs:
flavor:
description: 'AndroidApp flavor to build (expo<version> or vanilla)'
required: true
rn-project-path:
description: 'Path to the RN project to build'
required: true
rn-project-maven-path:
description: 'Maven path to the RN project, e.g. com/rnapp/brownfieldlib'
required: true
runs:
using: composite
steps:
- name: Setup
uses: ./.github/actions/setup
- name: Prepare Android environment
uses: ./.github/actions/prepare-android
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v4.2.1
# == Brownfield Gradle Plugin ==
- name: Publish Brownfield Gradle Plugin to Maven Local
run: |
yarn run brownfield:plugin:publish:local
shell: bash
# == RN app ==
- name: Prebuild Expo app
if: ${{ startsWith(inputs.flavor, 'expo') }}
run: |
cd ${{ inputs.rn-project-path }}
yarn run expo prebuild --platform android
shell: bash
- name: Patch ExpoApp Android build.gradle for CI
if: ${{ startsWith(inputs.flavor, 'expo') }}
run: |
cd ${{ inputs.rn-project-path }}
yarn run brownfield:prepare:android:ci
shell: bash
- name: Package AAR with the Brownfield CLI
run: |
cd ${{ inputs.rn-project-path }}
yarn run brownfield:package:android
shell: bash
- name: Publish AAR artifact to Maven Local
run: |
cd ${{ inputs.rn-project-path }}
yarn run brownfield:publish:android
shell: bash
- name: Verify debug AAR exists in Maven Local
run: stat ~/.m2/repository/${{ inputs.rn-project-maven-path }}/0.0.1-SNAPSHOT/brownfieldlib-0.0.1-SNAPSHOT-debug.aar
shell: bash
- name: Verify release AAR exists in Maven Local
run: stat ~/.m2/repository/${{ inputs.rn-project-maven-path }}/0.0.1-SNAPSHOT/brownfieldlib-0.0.1-SNAPSHOT-release.aar
shell: bash
# == AndroidApp ==
- name: Build native Android Brownfield app
run: yarn run build:example:android-consumer:${{ inputs.flavor }}
shell: bash