Skip to content

Instantly share code, notes, and snippets.

@paulonteri
Created October 31, 2021 05:43
Show Gist options
  • Save paulonteri/145a32468d2cd7aedb833987a321bad6 to your computer and use it in GitHub Desktop.
Save paulonteri/145a32468d2cd7aedb833987a321bad6 to your computer and use it in GitHub Desktop.
Deploy a React Native app to PlayStore using Google Cloud Build
timeout: 3600s
logsBucket: 'gs://$_CACHE_BUCKET'
options:
# machineType: 'E2_HIGHCPU_8'
steps:
- name: 'reactnativecommunity/react-native-android'
entrypoint: bash
args:
- -c
- |
set -e \
&& echo '$_ANDROID_KEYSTORE' > temp-my-upload-key.keystore \
&& base64 -d temp-my-upload-key.keystore > android/app/my-upload-key.keystore \
&& ls -l android/app/
- name: 'reactnativecommunity/react-native-android'
entrypoint: bash
args:
- -c
- |
set -e \
&& echo '$_PLAY_STORE_JSON' > android/app/play-store.json \
&& cat android/app/play-store.json
- name: 'reactnativecommunity/react-native-android'
entrypoint: bash
args:
- -c
- |
set -e \
&& echo '$_GOOGLE_SERVICES_JSON' > android/app/google-services.json \
&& ls -l android/app/ \
&& cat android/app/google-services.json
# # install node dependencies
- id: install-node-dependencies
name: 'reactnativecommunity/react-native-android'
entrypoint: bash
timeout: 300s
args:
- -c
- |
set -e \
&& yarn install --frozen-lockfile \
&& echo '<---------- Install node dependencies done ---------->'
# # # tests
# - id: tests
# name: 'reactnativecommunity/react-native-android'
# entrypoint: bash
# timeout: 300s
# args:
# - -c
# - |
# set -e \
# && yarn test
# # publish-to-playstore
- id: publish-to-playstore
name: 'reactnativecommunity/react-native-android'
entrypoint: bash
timeout: 1800s
args:
- -c
- |
set -e \
&& sudo rm -rf /opt/android/ndk \
&& echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p \
&& yarn publish-package --no-daemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment