11name : ' Remote Build - Android'
2- description : ' Github implementation of the RNEF Remote Build for Android'
2+ description : ' Github implementation of the Rock Remote Build for Android'
33
44inputs :
55 github-token :
@@ -21,8 +21,8 @@ inputs:
2121 description : ' Build variant'
2222 required : false
2323 default : ' debug'
24- rnef -build-extra-params :
25- description : ' Extra parameters to pass to "rnef build:android"'
24+ rock -build-extra-params :
25+ description : ' Extra parameters to pass to "rock build:android"'
2626 required : false
2727 sign :
2828 description : ' Whether to sign the build with release keystore'
@@ -94,23 +94,23 @@ runs:
9494 - name : Native Fingerprint
9595 id : fingerprint
9696 run : |
97- FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p android --raw)
97+ FINGERPRINT_OUTPUT=$(npx rock fingerprint -p android --raw)
9898 echo "FINGERPRINT=$FINGERPRINT_OUTPUT" >> $GITHUB_ENV
9999 shell : bash
100100 working-directory : ${{ inputs.working-directory }}
101101
102102 - name : Get Provider Name
103103 run : |
104- PROVIDER_NAME=$(npx rnef remote-cache get-provider-name)
104+ PROVIDER_NAME=$(npx rock remote-cache get-provider-name)
105105 echo "PROVIDER_NAME=$PROVIDER_NAME" >> $GITHUB_ENV
106106 shell : bash
107107 working-directory : ${{ inputs.working-directory }}
108108
109109 - name : Populate GitHub Token in Cache
110110 if : ${{ env.PROVIDER_NAME == 'GitHub' }}
111111 run : |
112- mkdir -p .rnef /cache
113- echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rnef /cache/project.json
112+ mkdir -p .rock /cache
113+ echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rock /cache/project.json
114114 shell : bash
115115
116116 # We create PR-related artifacts to avoid overwriting the main artifact with new JS bundle
@@ -120,7 +120,7 @@ runs:
120120 ARTIFACT_TRAITS="${{ inputs.variant }},${{ github.event.pull_request.number}}"
121121 echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV
122122
123- OUTPUT=$(npx rnef remote-cache list -p android --traits "${ARTIFACT_TRAITS}" --json)
123+ OUTPUT=$(npx rock remote-cache list -p android --traits "${ARTIFACT_TRAITS}" --json)
124124 if [ "$OUTPUT" ]; then
125125 echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
126126 echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV
@@ -134,7 +134,7 @@ runs:
134134 ARTIFACT_TRAITS="${{ inputs.variant }}"
135135 echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV
136136
137- OUTPUT=$(npx rnef remote-cache list -p android --traits "${ARTIFACT_TRAITS}" --json)
137+ OUTPUT=$(npx rock remote-cache list -p android --traits "${ARTIFACT_TRAITS}" --json)
138138 if [ "$OUTPUT" ]; then
139139 echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
140140 echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV
@@ -148,7 +148,7 @@ runs:
148148 # Transform commas to hyphens
149149 ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-')
150150 ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}"
151- echo "ARTIFACT_NAME=rnef -android-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV
151+ echo "ARTIFACT_NAME=rock -android-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV
152152 shell : bash
153153
154154 - name : Install Java
@@ -177,7 +177,7 @@ runs:
177177 - name : Determine Android sourceDir and appName
178178 if : ${{ !env.ARTIFACT_URL }}
179179 run : |
180- JSON_OUTPUT=$(npx rnef config -p android)
180+ JSON_OUTPUT=$(npx rock config -p android)
181181 echo "$JSON_OUTPUT" | jq -r '.project'
182182 ANDROID_SOURCE_DIR=$(echo "$JSON_OUTPUT" | jq -r '.project.android.sourceDir')
183183 APP_NAME=$(echo "$JSON_OUTPUT" | jq -r '.project.android.appName')
@@ -195,9 +195,9 @@ runs:
195195 - name : Build Android
196196 if : ${{ !env.ARTIFACT_URL }}
197197 run : |
198- npx rnef build:android \
198+ npx rock build:android \
199199 --variant "${{ inputs.variant }}" \
200- ${{ inputs.rnef -build-extra-params }}
200+ ${{ inputs.rock -build-extra-params }}
201201 shell : bash
202202 working-directory : ${{ inputs.working-directory }}
203203
@@ -212,23 +212,23 @@ runs:
212212 - name : Download and Unpack APK
213213 if : ${{ env.ARTIFACT_URL && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
214214 run : |
215- DOWNLOAD_OUTPUT=$(npx rnef remote-cache download --name ${{ env.ARTIFACT_NAME }} --json)
215+ DOWNLOAD_OUTPUT=$(npx rock remote-cache download --name ${{ env.ARTIFACT_NAME }} --json)
216216 APK_PATH=$(echo "$DOWNLOAD_OUTPUT" | jq -r '.path')
217217 echo "ARTIFACT_PATH=$APK_PATH" >> $GITHUB_ENV
218218 shell : bash
219219
220220 - name : Re-sign APK
221221 if : ${{ env.ARTIFACT_URL && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
222222 run : |
223- npx rnef sign:android ${{ env.ARTIFACT_PATH }} \
223+ npx rock sign:android ${{ env.ARTIFACT_PATH }} \
224224 --build-jsbundle
225225 shell : bash
226226 working-directory : ${{ inputs.working-directory }}
227227
228228 # Find artifact URL again before uploading, as other concurrent workflows could upload the same artifact
229229 - name : Find artifact URL again before uploading
230230 run : |
231- OUTPUT=$(npx rnef remote-cache list --name ${{ env.ARTIFACT_NAME }} --json)
231+ OUTPUT=$(npx rock remote-cache list --name ${{ env.ARTIFACT_NAME }} --json)
232232 if [ -z "$OUTPUT" ]; then
233233 echo "No artifact found"
234234 else
@@ -250,21 +250,21 @@ runs:
250250 - name : Upload Artifact to Remote Cache for re-signed builds
251251 if : ${{ env.PROVIDER_NAME != 'GitHub' && (inputs.re-sign == 'true' && github.event_name == 'pull_request') }}
252252 run : |
253- OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path ${{ env.ARTIFACT_PATH }} --json --verbose)
253+ OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path ${{ env.ARTIFACT_PATH }} --json --verbose)
254254 echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
255255 shell : bash
256256
257257 - name : Upload Artifact to Remote Cache for regular builds
258258 if : ${{ env.PROVIDER_NAME != 'GitHub' && !env.ARTIFACT_URL }}
259259 run : |
260- OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --verbose)
260+ OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --verbose)
261261 echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
262262 shell : bash
263263
264264 - name : Delete Old Re-Signed Artifacts
265265 if : ${{ env.ARTIFACT_URL && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
266266 run : |
267- npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest --json
267+ npx rock remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest --json
268268 shell : bash
269269
270270 - name : Clean Up Keystore and gradle properties (signed builds only)
@@ -276,7 +276,7 @@ runs:
276276
277277 - name : Post Build
278278 if : ${{ github.event_name == 'pull_request' && inputs.comment-bot == 'true' }}
279- uses : callstackincubator/android/.github/actions/rnef -post-build@v2
279+ uses : callstackincubator/android/.github/actions/rock -post-build@v2
280280 with :
281281 title : Android ${{ inputs.variant }} APK for all devices
282282 artifact-url : ${{ steps.upload-artifact.outputs.artifact-url || env.ARTIFACT_URL }}
0 commit comments