Skip to content

Commit 8fe27a5

Browse files
committed
Let there be Rock
1 parent 4bcd9a1 commit 8fe27a5

File tree

5 files changed

+29
-29
lines changed

5 files changed

+29
-29
lines changed

.github/actions/rnef-post-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'Post Build'
2-
description: 'Post build comment for RNEF builds'
2+
description: 'Post build comment for Rock builds'
33

44
inputs:
55
artifact-url:

.github/actions/rnef-post-build/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "rnef-post-build",
2+
"name": "rock-post-build",
33
"version": "1.0.0",
4-
"description": "Post build comment for RNEF builds",
4+
"description": "Post build comment for Rock builds",
55
"main": "index.mjs",
66
"dependencies": {
77
"@actions/core": "^1.11.1",

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# RNEF Android GitHub Action
1+
# Rock Android GitHub Action
22

3-
This GitHub Action enables remote building of Android applications using RNEF (React Native Enterprise Framework). It supports both debug and release builds, with automatic artifact caching and code signing capabilities.
3+
This GitHub Action enables remote building of Android applications using Rock. It supports both debug and release builds, with automatic artifact caching and code signing capabilities.
44

55
## Features
66

@@ -58,7 +58,7 @@ jobs:
5858
| `keystore-store-password` | Keystore store password | No | - |
5959
| `keystore-key-alias` | Keystore key alias | No | - |
6060
| `keystore-key-password` | Keystore key password | No | - |
61-
| `rnef-build-extra-params` | Extra parameters for rnef build:android | No | - |
61+
| `rock-build-extra-params` | Extra parameters for rock build:android | No | - |
6262
| `comment-bot` | Whether to comment PR with build link | No | `true` |
6363

6464
## Outputs
@@ -71,7 +71,7 @@ jobs:
7171
## Prerequisites
7272

7373
- Ubuntu runner
74-
- RNEF CLI installed in your project
74+
- Rock CLI installed in your project
7575
- For release builds:
7676
- Valid Android keystore file
7777
- Proper code signing setup

action.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: '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

44
inputs:
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 }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "action-android",
33
"version": "1.0.0",
4-
"description": "GitHub Action for building Android applications using RNEF (React Native Enterprise Framework)",
4+
"description": "GitHub Action for building Android applications using Rock",
55
"main": "index.js",
66
"author": "",
77
"license": "MIT",
@@ -13,7 +13,7 @@
1313
"github-actions",
1414
"android",
1515
"react-native",
16-
"rnef",
16+
"rock",
1717
"build",
1818
"ci"
1919
],

0 commit comments

Comments
 (0)