Skip to content

Commit 5a859e3

Browse files
authored
ci(android): update nightly patch (#1508)
1 parent 37415ca commit 5a859e3

File tree

3 files changed

+35
-19
lines changed

3 files changed

+35
-19
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Setup React Native
2+
description: Set up a specific version of React Native
3+
inputs:
4+
version:
5+
description: The React Native version to set up
6+
required: true
7+
runs:
8+
using: composite
9+
steps:
10+
- name: Set up react-native@${{ inputs.version }}
11+
run: |
12+
git apply scripts/disable-safe-area-context.patch
13+
git apply scripts/android-nightly.patch
14+
rm example/ios/Podfile.lock
15+
rm example/macos/Podfile.lock
16+
npm run set-react-version -- ${{ inputs.version }}
17+
shell: bash

.github/workflows/build.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ jobs:
128128
echo "::add-matcher::.github/swiftlint.json"
129129
swiftlint
130130
echo "::remove-matcher owner=swiftlint::"
131-
- name: Smoke test `set-react-version`
132-
run: |
133-
npm run set-react-version -- 0.66
131+
- name: Smoke test `setup-react-native` action
132+
uses: ./.github/actions/setup-react-native
133+
with:
134+
version: nightly
134135
timeout-minutes: 60
135136
ios:
136137
name: "iOS"
@@ -147,9 +148,9 @@ jobs:
147148
xcode-developer-dir: ${{ env.XCODE_DEVELOPER_DIR }}
148149
- name: Set up react-native@nightly
149150
if: ${{ github.event_name == 'schedule' }}
150-
run: |
151-
npm run set-react-version -- nightly
152-
rm example/ios/Podfile.lock
151+
uses: ./.github/actions/setup-react-native
152+
with:
153+
version: nightly
153154
- name: Install npm dependencies
154155
uses: ./.github/actions/yarn
155156
with:
@@ -238,11 +239,9 @@ jobs:
238239
java-version: ${{ github.event_name == 'schedule' && '17' || '11' }}
239240
- name: Set up react-native@nightly
240241
if: ${{ github.event_name == 'schedule' }}
241-
run: |
242-
git apply scripts/disable-safe-area-context.patch
243-
git apply scripts/android-nightly.patch
244-
npm run set-react-version -- nightly
245-
shell: bash
242+
uses: ./.github/actions/setup-react-native
243+
with:
244+
version: nightly
246245
- name: Install npm dependencies
247246
uses: ./.github/actions/yarn
248247
with:
@@ -314,9 +313,9 @@ jobs:
314313
xcode-developer-dir: ${{ env.XCODE_DEVELOPER_DIR }}
315314
- name: Set up react-native@canary
316315
if: ${{ github.event_name == 'schedule' }}
317-
run: |
318-
npm run set-react-version -- canary-macos
319-
rm example/macos/Podfile.lock
316+
uses: ./.github/actions/setup-react-native
317+
with:
318+
version: canary-macos
320319
- name: Install npm dependencies
321320
uses: ./.github/actions/yarn
322321
with:
@@ -415,9 +414,9 @@ jobs:
415414
platform: windows
416415
- name: Set up react-native@canary
417416
if: ${{ github.event_name == 'schedule' }}
418-
run: |
419-
npm run set-react-version -- canary-windows
420-
shell: bash
417+
uses: ./.github/actions/setup-react-native
418+
with:
419+
version: canary-windows
421420
- name: Install npm dependencies
422421
uses: ./.github/actions/yarn
423422
with:

scripts/android-nightly.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
2-
index 5083229..37aef8d 100644
2+
index 4e86b92..37aef8d 100644
33
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
44
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
55
@@ -1,6 +1,6 @@
66
distributionBase=GRADLE_USER_HOME
77
distributionPath=wrapper/dists
8-
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
8+
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
99
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
1010
networkTimeout=10000
1111
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)