1
- name : Commit Artifacts for Facebook WWW
1
+ name : Commit Artifacts for Facebook WWW and fbsource
2
2
3
3
on :
4
4
push :
@@ -108,7 +108,7 @@ jobs:
108
108
sed -i -e 's/ @license React*//' \
109
109
build/oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \
110
110
build/oss-experimental/react-refresh/cjs/react-refresh-babel.development.js
111
- - name : Move relevant files into compiled
111
+ - name : Move relevant files for React in www into compiled
112
112
run : |
113
113
mkdir -p ./compiled
114
114
mkdir -p ./compiled/facebook-www
@@ -132,6 +132,26 @@ jobs:
132
132
mv build/oss-experimental/react-refresh/cjs/react-refresh-babel.development.js \
133
133
./compiled/babel-plugin-react-refresh/index.js
134
134
135
+ ls -R ./compiled
136
+ - name : Move relevant files for React in fbsource into compiled-rn
137
+ run : |
138
+ BASE_FOLDER='compiled-rn/facebook-fbsource/xplat/js'
139
+ mkdir -p ${BASE_FOLDER}/react-native-github/Libraries/Renderer/
140
+ mkdir -p ${BASE_FOLDER}/RKJSModules/vendor/{scheduler,react,react-is,react-test-renderer}/
141
+
142
+ # Move React Native renderer
143
+ mv build/react-native/implementations/ $BASE_FOLDER/react-native-github/Libraries/Renderer/
144
+ mv build/react-native/shims/ $BASE_FOLDER/react-native-github/Libraries/Renderer/
145
+ mv build/facebook-react-native/scheduler/cjs/ $BASE_FOLDER/RKJSModules/vendor/scheduler/
146
+ mv build/facebook-react-native/react/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/
147
+ mv build/facebook-react-native/react-is/cjs/ $BASE_FOLDER/RKJSModules/vendor/react-is/
148
+ mv build/facebook-react-native/react-test-renderer/cjs/ $BASE_FOLDER/RKJSModules/vendor/react-test-renderer/
149
+
150
+ # Delete OSS renderer. OSS renderer is synced through internal script.
151
+ RENDERER_FOLDER=$BASE_FOLDER/react-native-github/Libraries/Renderer/implementations/
152
+ rm $RENDERER_FOLDER/ReactFabric-{dev,prod,profiling}.js
153
+ rm $RENDERER_FOLDER/ReactNativeRenderer-{dev,prod,profiling}.js
154
+
135
155
ls -R ./compiled
136
156
- name : Add REVISION file
137
157
run : |
@@ -140,8 +160,12 @@ jobs:
140
160
with :
141
161
name : compiled
142
162
path : compiled/
163
+ - uses : actions/upload-artifact@v3
164
+ with :
165
+ name : compiled-rn
166
+ path : compiled-rn/
143
167
144
- commit_artifacts :
168
+ commit_www_artifacts :
145
169
needs : download_artifacts
146
170
runs-on : ubuntu-latest
147
171
steps :
@@ -175,3 +199,29 @@ jobs:
175
199
commit_user_name : ${{ github.actor }}
176
200
commit_user_email : ${{ github.actor }}@users.noreply.github.com
177
201
create_branch : true
202
+
203
+ commit_fbsource_artifacts :
204
+ needs : download_artifacts
205
+ runs-on : ubuntu-latest
206
+ steps :
207
+ - uses : actions/checkout@v3
208
+ with :
209
+ ref : main
210
+ repository : facebook/react-fbsource-import
211
+ token : ${{secrets.FBSOURCE_SYNC_PUSH_TOKEN}}
212
+ - name : Ensure clean directory
213
+ run : rm -rf compiled-rn
214
+ - uses : actions/download-artifact@v3
215
+ with :
216
+ name : compiled-rn
217
+ path : compiled-rn/
218
+ - run : git status -u
219
+ - name : Commit changes to branch
220
+ uses : stefanzweifel/git-auto-commit-action@v4
221
+ with :
222
+ commit_message : |
223
+ ${{ github.event.head_commit.message }}
224
+
225
+ DiffTrain build for commit https://github.com/facebook/react/commit/${{ github.sha }}.
226
+ commit_user_name : ${{ github.actor }}
227
+ commit_user_email : ${{ github.actor }}@users.noreply.github.com
0 commit comments