Skip to content

Commit 838758e

Browse files
authored
feat: add ad-hoc input (#11)
* feat: add ad-hoc input * docs
1 parent 0a70afc commit 838758e

File tree

2 files changed

+31
-17
lines changed

2 files changed

+31
-17
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,28 @@ jobs:
4040
# provisioning-profile-base64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }}
4141
# provisioning-profile-name: 'YourProfileName'
4242
# keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
43+
# re-sign: true
44+
# ad-hoc: true
4345
```
4446

4547
## Inputs
4648

47-
| Input | Description | Required | Default |
48-
| ----------------------------- | ------------------------------------------ | -------- | --------------------- |
49-
| `github-token` | GitHub Token | Yes | - |
50-
| `working-directory` | Working directory for the build command | No | `.` |
51-
| `destination` | Build destination: "simulator" or "device" | Yes | `simulator` |
52-
| `scheme` | Xcode scheme | Yes | - |
53-
| `configuration` | Xcode configuration | Yes | - |
54-
| `re-sign` | Re-sign the app bundle with new JS bundle | No | `false` |
55-
| `certificate-base64` | Base64 encoded P12 file for device builds | No | - |
56-
| `certificate-password` | Password for the P12 file | No | - |
57-
| `provisioning-profile-base64` | Base64 encoded provisioning profile | No | - |
58-
| `provisioning-profile-name` | Name of the provisioning profile | No | - |
59-
| `keychain-password` | Password for temporary keychain | No | - |
60-
| `rnef-build-extra-params` | Extra parameters for rnef build:ios | No | - |
61-
| `comment-bot` | Whether to comment PR with build link | No | `true` |
49+
| Input | Description | Required | Default |
50+
| ----------------------------- | ------------------------------------------------------------------------------- | -------- | ----------- |
51+
| `github-token` | GitHub Token | Yes | - |
52+
| `working-directory` | Working directory for the build command | No | `.` |
53+
| `destination` | Build destination: "simulator" or "device" | Yes | `simulator` |
54+
| `scheme` | Xcode scheme | Yes | - |
55+
| `configuration` | Xcode configuration | Yes | - |
56+
| `re-sign` | Re-sign the app bundle with new JS bundle | No | `false` |
57+
| `ad-hoc` | Upload the IPA for ad-hoc distribution to easily install on provisioned devices | No | `false` |
58+
| `certificate-base64` | Base64 encoded P12 file for device builds | No | - |
59+
| `certificate-password` | Password for the P12 file | No | - |
60+
| `provisioning-profile-base64` | Base64 encoded provisioning profile | No | - |
61+
| `provisioning-profile-name` | Name of the provisioning profile | No | - |
62+
| `keychain-password` | Password for temporary keychain | No | - |
63+
| `rnef-build-extra-params` | Extra parameters for rnef build:ios | No | - |
64+
| `comment-bot` | Whether to comment PR with build link | No | `true` |
6265

6366
## Outputs
6467

action.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ inputs:
2626
re-sign:
2727
description: Re-sign IPA with new JS bundle. No signing is done for APP bundle (destination == simulator).
2828
required: false
29+
ad-hoc:
30+
description: 'Upload the IPA for ad-hoc distribution to easily install on provisioned devices'
31+
required: false
32+
default: false
2933
certificate-base64:
3034
description: '[Device Builds] Base64 encoded P12 file containing Apple certificate (incl. private key)'
3135
required: false
@@ -311,14 +315,21 @@ runs:
311315
- name: Upload Artifact to Remote Cache for re-signed builds
312316
if: ${{ env.PROVIDER_NAME != 'GitHub' && (inputs.re-sign == 'true' && github.event_name == 'pull_request') }}
313317
run: |
314-
OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path ${{ env.ARTIFACT_PATH }} --json --verbose)
318+
OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path ${{ env.ARTIFACT_PATH }} --json)
315319
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
316320
shell: bash
317321

318322
- name: Upload Artifact to Remote Cache for regular builds
319323
if: ${{ env.PROVIDER_NAME != 'GitHub' && !env.ARTIFACT_URL }}
320324
run: |
321-
OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --verbose)
325+
OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json)
326+
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
327+
shell: bash
328+
329+
- name: Upload for Ad-hoc distribution
330+
if: ${{ env.PROVIDER_NAME != 'GitHub' && inputs.ad-hoc == 'true' }}
331+
run: |
332+
OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --ad-hoc)
322333
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
323334
shell: bash
324335

0 commit comments

Comments
 (0)