11name : in-app-payment-react-native-plugin
2-
32on : [push]
4-
53jobs :
64 install-and-test :
75 runs-on : ubuntu-latest
86 steps :
9- - uses : actions/checkout@v4
10-
11- - uses : actions/setup-node@v4
7+ - uses : actions/checkout@v2
8+ - uses : actions/setup-node@v2
129 with :
13- node-version : 20.x
14- cache : ' yarn'
15-
16- - name : Install deps & build lib
17- run : |
18- # Instala deps del plugin raíz
19- yarn install
20- # Genera lib/module + types (bob build)
21- yarn prepare
22-
23- - name : Lint & Test
24- run : |
25- yarn lint
26- yarn test
27-
28- - name : Install example-expo deps
29- run : |
30- cd example-expo
31- yarn install
10+ node-version : 18.x
11+ - run : |
12+ yarn && yarn lint && yarn test
13+ cd example-expo && yarn && cd ..
3214
3315 build-android :
3416 needs : install-and-test
3517 runs-on : ubuntu-latest
3618 steps :
3719 - name : Checkout repository
3820 uses : actions/checkout@v4
39-
40- - name : Set up Node.js
41- uses : actions/setup-node@v4
42- with :
43- node-version : 20.x
44- cache : ' yarn'
45-
4621 - name : Set up JDK 17
4722 uses : actions/setup-java@v4
4823 with :
@@ -64,27 +39,27 @@ jobs:
6439 uses : actions/cache@v4
6540 with :
6641 path : ~/.gradle/wrapper
67- key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('example-expo/android/gradle/wrapper/gradle-wrapper.properties') }}
68-
42+ key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
6943 - name : Cache Gradle Dependencies
7044 uses : actions/cache@v4
7145 with :
7246 path : ~/.gradle/caches
73- key : ${{ runner.os }}-gradle-caches-${{ hashFiles('example-expo/android/ gradle/wrapper/gradle-wrapper.properties') }}
47+ key : ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
7448 restore-keys : |
75- ${{ runner.os }}-gradle-caches-
49+ ${{ runner.os }}-gradle-caches-
50+ - name : Install npm dependencies
51+ uses : actions/checkout@v2
7652
7753 - name : Install deps & build plugin (lib/)
7854 run : |
7955 yarn install
8056 yarn prepare
8157 echo "Contenido de lib:"
8258 ls -R lib || echo "⚠️ lib no existe, bob build no se ejecutó bien"
83-
8459 - name : Build Android
8560 run : |
86- cd example-expo
87- yarn install
61+ yarn
62+ cd example-expo && yarn
8863 npx expo prebuild -p android
8964 cd android
9065 ./gradlew :app:assembleRelease
@@ -93,40 +68,26 @@ jobs:
9368 needs : install-and-test
9469 runs-on : macos-latest
9570 steps :
96- - uses : actions/checkout@v4
97-
71+ - uses : actions/checkout@v2
9872 - name : Use Node.js
99- uses : actions/setup-node@v4
73+ uses : actions/setup-node@v3
10074 with :
101- node-version : 20.x
102- cache : ' yarn'
103-
104- - name : Install deps & build lib
105- run : |
106- yarn install
107- yarn prepare
108-
109- - name : Install CocoaPods
110- run : gem install cocoapods
111-
112- - name : Prebuild & install pods
113- run : |
75+ node-version : 18.x
76+ - run : |
77+ gem install cocoapods
11478 cd example-expo
115- yarn install
79+ yarn
11680 npx expo prebuild -p ios
117- cd ios
118- pod install
119-
81+ cd ios && pod install
12082 - name : Build iOS (debug)
121- run : |
122- xcodebuild \
123- -workspace example-expo/ios/SquareInAppPaymentsExpoExample.xcworkspace \
124- -scheme SquareInAppPaymentsExpoExample \
125- clean archive \
126- -sdk iphoneos \
127- -configuration Debug \
128- -UseModernBuildSystem=NO \
129- -archivePath $PWD/SquareInAppPaymentsExpoExample \
130- CODE_SIGNING_ALLOWED=NO \
131- CODE_SIGNING_REQUIRED=NO \
132- CODE_SIGN_IDENTITY=NO
83+ run : " xcodebuild \
84+ -workspace example-expo/ios/SquareInAppPaymentsExpoExample.xcworkspace \
85+ -scheme SquareInAppPaymentsExpoExample \
86+ clean archive \
87+ -sdk iphoneos \
88+ -configuration Debug \
89+ -UseModernBuildSystem=NO \
90+ -archivePath $PWD/SquareInAppPaymentsExpoExample \
91+ CODE_SIGNING_ALLOWED=NO \
92+ CODE_SIGNING_REQUIRED=NO \
93+ CODE_SIGN_IDENTITY=NO"
0 commit comments