Skip to content

Instantly share code, notes, and snippets.

@suciptoid
Created November 12, 2017 22:57
Show Gist options
  • Save suciptoid/6389166aaa1cf6b4e7026abd366e7fb7 to your computer and use it in GitHub Desktop.
Save suciptoid/6389166aaa1cf6b4e7026abd366e7fb7 to your computer and use it in GitHub Desktop.
image: registry.gitlab.com/showcheap/android-ci:react-native
before_script:
- sdkmanager "platforms;android-23"
- sdkmanager "build-tools;25.0.3"
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x ./android/gradlew
- npm install
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- .gradle/
stages:
- test
- build
- deploy
test:
stage: test
script:
- cd android && ./gradlew check && cd ..
build:
stage: build
script:
- cd android && ./gradlew assembleRelease && cd ..
artifacts:
paths:
- android/app/build/outputs/
only:
- master
deploy:
stage: deploy
script:
- echo $PLAYSTORE_KEY > android/keystores/google-play.json
- cd android && ./gradlew publishRelease && cd ..
only:
- tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment