Skip to content

Commit bfd4a4c

Browse files
authored
website: adjust CI instructions (#231)
1 parent a0a8924 commit bfd4a4c

File tree

3 files changed

+42
-20
lines changed

3 files changed

+42
-20
lines changed

website/docs/docs/remote-cache/github-actions/android.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ Use in the GitHub Workflow file like this:
1111
```yaml
1212
- name: RNEF Remote Build - Android
1313
id: rnef-remote-build-android
14-
uses: ./.github/actions/rnef-remote-build-android
14+
uses: callstackincubator/android@v1
1515
with:
1616
variant: debug
17+
github-token: ${{ secrets.GITHUB_TOKEN }}
1718
```
1819
1920
## Tester Builds For All Devices
@@ -43,9 +44,10 @@ Use in the GitHub Workflow file like this:
4344
```yaml
4445
- name: RNEF Remote Build - Android device
4546
id: rnef-remote-build-android
46-
uses: ./.github/actions/rnef-remote-build-android
47+
uses: callstackincubator/android@v1
4748
with:
4849
variant: release
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
4951
# if you need to sign with non-debug keystore
5052
sign: true
5153
keystore-base64: ${{ secrets.KEYSTORE_BASE64 }}
@@ -66,9 +68,10 @@ Pass extra parameters to the `rnef build:android` command, in order to apply cus
6668
```yaml
6769
- name: RNEF Remote Build - Android
6870
id: rnef-remote-build-android
69-
uses: ./.github/actions/rnef-remote-build-android
71+
uses: callstackincubator/android@v1
7072
with:
7173
variant: release
74+
github-token: ${{ secrets.GITHUB_TOKEN }}
7275
rnef-build-extra-params: '--aab' # build an Android App Bundle for the Play Store
7376
```
7477

@@ -83,9 +86,10 @@ To avoid polluting artifact storage it will also handle removal of old artifacts
8386
```yaml
8487
- name: RNEF Remote Build - Android
8588
id: rnef-remote-build-android
86-
uses: ./.github/actions/rnef-remote-build-android
89+
uses: callstackincubator/android@v1
8790
with:
8891
variant: release
92+
github-token: ${{ secrets.GITHUB_TOKEN }}
8993
re-sign: true
9094
```
9195

@@ -98,9 +102,10 @@ For security reasons we add Gradle Wrapper validation step to Android build acti
98102
```yaml
99103
- name: RNEF Remote Build - Android
100104
id: rnef-remote-build-android
101-
uses: ./.github/actions/rnef-remote-build-android
105+
uses: callstackincubator/android@v1
102106
with:
103107
variant: debug
108+
github-token: ${{ secrets.GITHUB_TOKEN }}
104109
validate-gradle-wrapper: false
105110
```
106111

@@ -125,9 +130,10 @@ You'll need to set `working-directory: ./packages/mobile`:
125130
```yaml
126131
- name: RNEF Remote Build - Android
127132
id: rnef-remote-build-android
128-
uses: ./.github/actions/rnef-remote-build-android
133+
uses: callstackincubator/android@v1
129134
with:
130135
variant: debug
136+
github-token: ${{ secrets.GITHUB_TOKEN }}
131137
working-directory: ./packages/mobile
132138
```
133139

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
# Configuration
22

3-
React Native Enterprise Framework ships with a ready-to-use GitHub Action whch you can include in your GHA workflows to build your iOS and Android apps and store native artifacts to reuse across CI jobs and local dev environment through RNEF CLI.
3+
React Native Enterprise Framework ships with a ready-to-use GitHub Actions:
44

5-
## Secrets
5+
- [`callstackincubator/ios`](https://github.com/callstackincubator/ios)
6+
- [`callstackincubator/android`](https://github.com/callstackincubator/android)
67

7-
To use the RNEF GitHub Actions, you need to set up the secrets on your GitHub repository:
8-
`NPM_TOKEN` and
9-
platforms specific secrets described below in the iOS and Android sections.
8+
which you can include in your GHA workflows to build iOS and Android apps and store native artifacts to reuse across CI jobs and local dev environment through RNEF CLI.
109

11-
## Change workflow permissions
10+
## Workflow permissions
1211

13-
Settings -> Actions -> General -> Workflow Permissions -> Read and write permissions
12+
Make sure to include the following workflow permissions for your project:
13+
14+
Settings -> Actions -> General -> Workflow Permissions -> **Read and write permissions**
1415

1516
## Generate GitHub Personal Access Token for downloading cached builds
1617

17-
Generate GitHub Personal Access Token for downloading cached builds at: https://github.com/settings/tokens. Include "repo", "workflow", and "read:org" permissions.
1818
You'll be asked about this token when cached build is available while running the `npx rnef run:` command.
19+
20+
### Fine-grained tokens for organizations
21+
22+
Generate a [fine-grained Personal Access Token](https://github.com/settings/personal-access-tokens/new) and set **Resource owner** to your organization. Ensure the following repository permissions:
23+
24+
- Actions: Read
25+
- Contents: Read
26+
- Metadata: Read-only
27+
28+
### Personal classic access token for individual developers
29+
30+
Generate [GitHub Personal Access Token](https://github.com/settings/tokens/new?scopes=repo) for downloading cached builds with `repo` permissions.

website/docs/docs/remote-cache/github-actions/ios.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ Use in the GitHub Workflow file like this:
99
```yaml
1010
- name: RNEF Remote Build - iOS simulator
1111
id: rnef-remote-build-ios
12-
uses: ./.github/actions/rnef-remote-build-ios
12+
uses: callstackincubator/ios@v1
1313
with:
1414
destination: simulator
15+
github-token: ${{ secrets.GITHUB_TOKEN }}
1516
configuration: Debug
1617
```
1718
@@ -116,9 +117,10 @@ Use in the GitHub Workflow file like this:
116117
```yaml
117118
- name: RNEF Remote Build - iOS device
118119
id: rnef-remote-build-ios
119-
uses: ./.github/actions/rnef-remote-build-ios
120+
uses: callstackincubator/ios@v1
120121
with:
121122
destination: device
123+
github-token: ${{ secrets.GITHUB_TOKEN }}
122124
configuration: Release
123125
certificate-base64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
124126
certificate-password: ${{ secrets.APPLE_BUILD_CERTIFICATE_PASSWORD }}
@@ -140,9 +142,10 @@ Pass extra parameters to the `rnef build:ios` command, in order to apply custom
140142
```yaml
141143
- name: RNEF Remote Build - iOS device
142144
id: rnef-remote-build-ios
143-
uses: ./.github/actions/rnef-remote-build-ios
145+
uses: callstackincubator/ios@v1
144146
with:
145147
destination: device
148+
github-token: ${{ secrets.GITHUB_TOKEN }}
146149
rnef-build-extra-params: 'CUSTOM FLAGS AND ENVIRONMENT VARIABLES'
147150
```
148151

@@ -157,14 +160,14 @@ To avoid polluting artifact storage it will also handle removal of old artifacts
157160
```yaml
158161
- name: RNEF Remote Build - iOS device
159162
id: rnef-remote-build-ios
160-
uses: ./.github/actions/rnef-remote-build-ios
163+
uses: callstackincubator/ios@v1
161164
with:
162165
destination: device
166+
github-token: ${{ secrets.GITHUB_TOKEN }}
163167
re-sign: true
164168
# ...rest of code signing inputs
165169
```
166170

167-
168171
#### `working-directory`
169172

170173
Default: `.`
@@ -186,9 +189,10 @@ You'll need to set `working-directory: ./packages/mobile`:
186189
```yaml
187190
- name: RNEF Remote Build - iOS device
188191
id: rnef-remote-build-ios
189-
uses: ./.github/actions/rnef-remote-build-ios
192+
uses: callstackincubator/ios@v1
190193
with:
191194
destination: device
195+
github-token: ${{ secrets.GITHUB_TOKEN }}
192196
working-directory: ./packages/mobile
193197
```
194198

0 commit comments

Comments
 (0)