Skip to content

Commit dd886b4

Browse files
committed
Let there be Rock
1 parent 838758e commit dd886b4

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
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.js",
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 iOS GitHub Action
1+
# Rock iOS GitHub Action
22

3-
This GitHub Action enables remote building of iOS applications using RNEF (React Native Enterprise Framework). It supports both simulator and device builds, with automatic artifact caching and code signing capabilities.
3+
This GitHub Action enables remote building of iOS applications using [Rock](https://rockjs.dev). It supports both simulator and device builds, with automatic artifact caching and code signing capabilities.
44

55
## Features
66

@@ -60,7 +60,7 @@ jobs:
6060
| `provisioning-profile-base64` | Base64 encoded provisioning profile | No | - |
6161
| `provisioning-profile-name` | Name of the provisioning profile | No | - |
6262
| `keychain-password` | Password for temporary keychain | No | - |
63-
| `rnef-build-extra-params` | Extra parameters for rnef build:ios | No | - |
63+
| `rock-build-extra-params` | Extra parameters for rock build:ios | No | - |
6464
| `comment-bot` | Whether to comment PR with build link | No | `true` |
6565

6666
## Outputs
@@ -73,7 +73,7 @@ jobs:
7373
## Prerequisites
7474

7575
- macOS runner
76-
- RNEF CLI installed in your project
76+
- Rock CLI installed in your project
7777
- For device builds:
7878
- Valid Apple Developer certificate
7979
- Valid provisioning profile

action.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'Remote Build - iOS'
2-
description: 'Github implementation of the RNEF Remote Build for iOS'
2+
description: 'Github implementation of the Rock Remote Build for iOS'
33

44
branding:
55
icon: 'box'
@@ -14,7 +14,7 @@ inputs:
1414
required: false
1515
default: '.'
1616
destination:
17-
description: 'Destination to build to: "simulator" or "device". Using "device" runs "rnef build:ios --archive" and code signing settings (certificate, provisioning profile, keychain password) are required.'
17+
description: 'Destination to build to: "simulator" or "device". Using "device" runs "rock build:ios --archive" and code signing settings (certificate, provisioning profile, keychain password) are required.'
1818
required: true
1919
default: 'simulator' # 'simulator' or 'device'
2020
scheme:
@@ -45,8 +45,8 @@ inputs:
4545
keychain-password:
4646
description: '[Device Builds] Password that will protect temporary keychain used for signing (can be a random string)'
4747
required: false
48-
rnef-build-extra-params:
49-
description: 'Extra parameters to pass to "rnef build:ios"'
48+
rock-build-extra-params:
49+
description: 'Extra parameters to pass to "rock build:ios"'
5050
required: false
5151
comment-bot:
5252
description: 'Whether to send a comment under PR with the link to the generated build'
@@ -102,23 +102,23 @@ runs:
102102
- name: Native Fingerprint
103103
id: fingerprint
104104
run: |
105-
FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p ios --raw)
105+
FINGERPRINT_OUTPUT=$(npx rock fingerprint -p ios --raw)
106106
echo "FINGERPRINT=$FINGERPRINT_OUTPUT" >> $GITHUB_ENV
107107
shell: bash
108108
working-directory: ${{ inputs.working-directory }}
109109

110110
- name: Get Provider Name
111111
run: |
112-
PROVIDER_NAME=$(npx rnef remote-cache get-provider-name)
112+
PROVIDER_NAME=$(npx rock remote-cache get-provider-name)
113113
echo "PROVIDER_NAME=$PROVIDER_NAME" >> $GITHUB_ENV
114114
shell: bash
115115
working-directory: ${{ inputs.working-directory }}
116116

117117
- name: Populate GitHub Token in Cache
118118
if: ${{ env.PROVIDER_NAME == 'GitHub' }}
119119
run: |
120-
mkdir -p .rnef/cache
121-
echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rnef/cache/project.json
120+
mkdir -p .rock/cache
121+
echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rock/cache/project.json
122122
shell: bash
123123

124124
# We create PR-related artifacts to avoid overwriting the main artifact with new JS bundle
@@ -128,7 +128,7 @@ runs:
128128
ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}"
129129
echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV
130130
131-
OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json)
131+
OUTPUT=$(npx rock remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json)
132132
if [ "$OUTPUT" ]; then
133133
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
134134
echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV
@@ -142,7 +142,7 @@ runs:
142142
ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }}"
143143
echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV
144144
145-
OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json)
145+
OUTPUT=$(npx rock remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json)
146146
if [ "$OUTPUT" ]; then
147147
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
148148
echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV
@@ -156,7 +156,7 @@ runs:
156156
# Transform commas to hyphens
157157
ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-')
158158
ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}"
159-
echo "ARTIFACT_NAME=rnef-ios-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV
159+
echo "ARTIFACT_NAME=rock-ios-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV
160160
shell: bash
161161

162162
- name: Set Provisioning Profile Path
@@ -198,7 +198,7 @@ runs:
198198
- name: Determine iOS sourceDir
199199
if: ${{ !env.ARTIFACT_URL }}
200200
run: |
201-
JSON_OUTPUT=$(npx rnef config -p ios)
201+
JSON_OUTPUT=$(npx rock config -p ios)
202202
echo "$JSON_OUTPUT" | jq -r '.project'
203203
IOS_SOURCE_DIR=$(echo "$JSON_OUTPUT" | jq -r '.project.ios.sourceDir')
204204
echo "IOS_SOURCE_DIR=$IOS_SOURCE_DIR" >> $GITHUB_ENV
@@ -208,22 +208,22 @@ runs:
208208
- name: Build iOS
209209
if: ${{ !env.ARTIFACT_URL }}
210210
run: |
211-
npx rnef build:ios \
211+
npx rock build:ios \
212212
${{ inputs.destination == 'device' && '--archive' || '' }} \
213213
--scheme "${{ inputs.scheme }}" \
214214
--configuration "${{ inputs.configuration }}" \
215215
--build-folder build \
216216
--destination ${{ inputs.destination }} \
217217
--verbose \
218-
${{ inputs.rnef-build-extra-params }}
218+
${{ inputs.rock-build-extra-params }}
219219
shell: bash
220220
working-directory: ${{ inputs.working-directory }}
221221

222222
- name: Find Build Artifact
223223
if: ${{ !env.ARTIFACT_URL }}
224224
run: |
225225
if [ "${{ inputs.destination }}" == "device" ]; then
226-
IPA_PATH=$(find .rnef/cache/ios/export -maxdepth 1 -name '*.ipa' -type f | head -1)
226+
IPA_PATH=$(find .rock/cache/ios/export -maxdepth 1 -name '*.ipa' -type f | head -1)
227227
echo IPA_PATH $IPA_PATH
228228
echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV
229229
else
@@ -242,15 +242,15 @@ runs:
242242
- name: Download and Unpack IPA
243243
if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
244244
run: |
245-
DOWNLOAD_OUTPUT=$(npx rnef remote-cache download --name ${{ env.ARTIFACT_NAME }} --json)
245+
DOWNLOAD_OUTPUT=$(npx rock remote-cache download --name ${{ env.ARTIFACT_NAME }} --json)
246246
IPA_PATH=$(echo "$DOWNLOAD_OUTPUT" | jq -r '.path')
247247
echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV
248248
shell: bash
249249

250250
- name: Download and Unpack APP
251251
if: ${{ env.ARTIFACT_URL && inputs.destination == 'simulator' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
252252
run: |
253-
DOWNLOAD_OUTPUT=$(npx rnef remote-cache download --name ${{ env.ARTIFACT_NAME }} --json)
253+
DOWNLOAD_OUTPUT=$(npx rock remote-cache download --name ${{ env.ARTIFACT_NAME }} --json)
254254
APP_PATH=$(echo "$DOWNLOAD_OUTPUT" | jq -r '.path')
255255
APP_DIR=$(dirname "$APP_PATH")
256256
APP_BASENAME=$(basename "$APP_PATH")
@@ -265,7 +265,7 @@ runs:
265265
- name: Re-sign IPA
266266
if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
267267
run: |
268-
npx rnef sign:ios ${{ env.ARTIFACT_PATH }} \
268+
npx rock sign:ios ${{ env.ARTIFACT_PATH }} \
269269
--build-jsbundle \
270270
--identity ${{ env.IDENTITY }}
271271
shell: bash
@@ -274,7 +274,7 @@ runs:
274274
- name: Re-bundle APP
275275
if: ${{ env.ARTIFACT_URL && inputs.destination == 'simulator' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
276276
run: |
277-
npx rnef sign:ios ${{ env.ARTIFACT_TAR_PATH }} \
277+
npx rock sign:ios ${{ env.ARTIFACT_TAR_PATH }} \
278278
--build-jsbundle \
279279
--app
280280
shell: bash
@@ -286,14 +286,14 @@ runs:
286286
ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}"
287287
ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-')
288288
ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}"
289-
echo "ARTIFACT_NAME=rnef-ios-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV
289+
echo "ARTIFACT_NAME=rock-ios-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV
290290
echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV
291291
shell: bash
292292

293293
# Find artifact URL again before uploading, as other concurrent workflows could upload the same artifact
294294
- name: Find artifact URL again before uploading
295295
run: |
296-
OUTPUT=$(npx rnef remote-cache list --name ${{ env.ARTIFACT_NAME }} --json)
296+
OUTPUT=$(npx rock remote-cache list --name ${{ env.ARTIFACT_NAME }} --json)
297297
if [ -z "$OUTPUT" ]; then
298298
echo "No artifact found"
299299
else
@@ -315,28 +315,28 @@ runs:
315315
- name: Upload Artifact to Remote Cache for re-signed builds
316316
if: ${{ env.PROVIDER_NAME != 'GitHub' && (inputs.re-sign == 'true' && github.event_name == 'pull_request') }}
317317
run: |
318-
OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path ${{ env.ARTIFACT_PATH }} --json)
318+
OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path ${{ env.ARTIFACT_PATH }} --json)
319319
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
320320
shell: bash
321321

322322
- name: Upload Artifact to Remote Cache for regular builds
323323
if: ${{ env.PROVIDER_NAME != 'GitHub' && !env.ARTIFACT_URL }}
324324
run: |
325-
OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json)
325+
OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json)
326326
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
327327
shell: bash
328328

329329
- name: Upload for Ad-hoc distribution
330330
if: ${{ env.PROVIDER_NAME != 'GitHub' && inputs.ad-hoc == 'true' }}
331331
run: |
332-
OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --ad-hoc)
332+
OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --ad-hoc)
333333
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
334334
shell: bash
335335

336336
- name: Delete Old Re-Signed Artifacts
337337
if: ${{ env.ARTIFACT_URL && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
338338
run: |
339-
npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest --json
339+
npx rock remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest --json
340340
shell: bash
341341

342342
- name: Clean Up Code Signing (device builds only)
@@ -352,12 +352,12 @@ runs:
352352

353353
- name: Cleanup Cache
354354
run: |
355-
rm -rf .rnef/cache/project.json
355+
rm -rf .rock/cache/project.json
356356
shell: bash
357357

358358
- name: Post Build
359359
if: ${{ github.event_name == 'pull_request' && inputs.comment-bot == 'true' }}
360-
uses: callstackincubator/ios/.github/actions/rnef-post-build@v2
360+
uses: callstackincubator/ios/.github/actions/rock-post-build@v2
361361
with:
362362
title: iOS ${{ inputs.configuration }} ${{ inputs.destination == 'simulator' && 'APP for simulators' || 'IPA for physical devices' }}
363363
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-ios",
33
"version": "1.0.0",
4-
"description": "GitHub Action for building iOS applications using RNEF (React Native Enterprise Framework)",
4+
"description": "GitHub Action for building iOS applications using Rock",
55
"main": "index.js",
66
"author": "",
77
"license": "MIT",
@@ -13,7 +13,7 @@
1313
"github-actions",
1414
"ios",
1515
"react-native",
16-
"rnef",
16+
"rock",
1717
"build",
1818
"ci"
1919
],

0 commit comments

Comments
 (0)