.gitlab-ci.yml 738 Bytes
Newer Older
Roger Barton's avatar
Roger Barton committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
image: registry.gitlab.com/showcheap/android-ci:react-native

variables:
  GIT_SUBMODULE_STRATEGY: recursive

before_script:
  - sdkmanager "platforms;android-27"
  - sdkmanager "build-tools;28.0.2"
  - export GRADLE_USER_HOME=`pwd`/.gradle
  - chmod +x ./gradlew
  - npm install
  - echo $PLAYSTORE_KEY > app/google-play-key.json
  - echo $SIGNING_KEYSTORE > app/keystore.properties

cache:
  key: "$CI_COMMIT_REF_NAME"
  paths:
     - .gradle/

stages:
  - test
  - build
  - deploy

test:
  stage: test
  script:
     - ./gradlew check

build:
  stage: build
  script:
     - ./gradlew assembleRelease
  artifacts:
    paths:
      - app/build/outputs/

deploy:
  stage: deploy
  when: manual
  script:
     - ./gradlew publishRelease