-
-
Save joberthrogers18/d042dcb87566ab71041f8b81391152cd to your computer and use it in GitHub Desktop.
Expo React Native Complete CI / CD Workflow Using Github Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Expo CI CD | |
on: | |
push : | |
branches : [release] | |
jobs: | |
Build-for-android: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- uses: actions/setup-java@v1.4.3 | |
with: | |
java-version: '9.0.4' # The JDK version to make available on the path. | |
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | |
architecture: x64 # (x64 or x86) - defaults to x64 | |
- uses: expo/expo-github-action@v5 | |
with: | |
expo-version: 3.x | |
expo-username: ${{ secrets.EXPO_CLI_USERNAME }} | |
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }} | |
- name: Install deps | |
run: yarn install | |
- name: Build Android APK Bundle | |
run: expo build:android | |
Push-to-Playstore: | |
needs: [Build-for-android] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- uses: actions/setup-java@v1.4.3 | |
with: | |
java-version: '9.0.4' # The JDK version to make available on the path. | |
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | |
architecture: x64 # (x64 or x86) - defaults to x64 | |
- uses: expo/expo-github-action@v5 | |
with: | |
expo-version: 3.x | |
expo-username: ${{ secrets.EXPO_CLI_USERNAME }} | |
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }} | |
- name: Install deps | |
run: yarn install | |
- name: Upload to Google Play Console | |
run: expo upload:android --latest --key <Path to Google Sevice Account Json> | |
build-for-IOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- uses: actions/setup-java@v1.4.3 | |
with: | |
java-version: '9.0.4' # The JDK version to make available on the path. | |
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | |
architecture: x64 # (x64 or x86) - defaults to x64 | |
- uses: sinoru/actions-setup-xcode@v1.1.2 | |
with: | |
xcode-version: '11.2.1' # Exact version of a Xcode version to use | |
apple-id: ${{ secrets.EXPO_APPLE_ID }} # Apple ID to download from Apple Developer when Xcode not available in local | |
apple-id-password: ${{ secrets.EXPO_APPLE_PASSWORD }} | |
- uses: expo/expo-github-action@v5 | |
with: | |
expo-version: 3.x | |
expo-username: ${{ secrets.EXPO_CLI_USERNAME }} | |
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }} | |
- name: Install deps | |
run: yarn install | |
- name: Build iOS app | |
run: expo build:ios | |
env: | |
EXPO_APPLE_ID: ${{secrets.EXPO_APPLE_ID}} | |
EXPO_APPLE_ID_PASSWORD: ${{secrets.EXPO_APPLE_PASSWORD}} | |
publish-to-testflight: | |
needs: [build-for-IOS] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- uses: actions/setup-java@v1.4.3 | |
with: | |
java-version: '9.0.4' # The JDK version to make available on the path. | |
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | |
architecture: x64 # (x64 or x86) - defaults to x64 | |
- uses: sinoru/actions-setup-xcode@v1.1.2 | |
with: | |
xcode-version: '11.2.1' # Exact version of a Xcode version to use | |
apple-id: ${{ secrets.EXPO_APPLE_ID }} # Apple ID to download from Apple Developer when Xcode not available in local | |
apple-id-password: ${{ secrets.EXPO_APPLE_PASSWORD }} | |
- uses: expo/expo-github-action@v5 | |
with: | |
expo-version: 3.x | |
expo-username: ${{ secrets.EXPO_CLI_USERNAME }} | |
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }} | |
- name: Install deps | |
run: yarn install | |
- uses: jakemwood/expo-apple-2fa@main | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
with: | |
expo_apple_id: ${{ secrets.EXPO_APPLE_ID }} | |
expo_apple_password: ${{ secrets.EXPO_APPLE_PASSWORD }} | |
app_specific_password: ${{ secrets.EXPO_APP_SPECIFIC_PASSWORD }} | |
tfa_phone_number: "+11 (123) 456-789" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment