From 39b264ea53d68389610b434cf21f417b5284304a Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sat, 4 Apr 2020 22:57:19 +0530 Subject: [PATCH] Add .gitlab-ci.yml --- .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..53420fe --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,34 @@ +stages: + - build + - deploy + +build: + image: reactnativecommunity/react-native-android + stage: build + script: + - yarn install + - cd android && chmod +x gradlew + - ./gradlew assembleRelease + artifacts: + paths: + - android/app/build/outputs/ + + +deploy_tg: + image: curlimages/curl + stage: deploy + script: + - >- + curl + -F chat_id=$TG_CHAT_ID + -F document=@android/app/build/outputs/apk/release/app-release.apk + -F caption=" Branch: $CI_COMMIT_BRANCH + + Commit: $CI_COMMIT_SHORT_SHA + + Tag(if any): $CI_COMMIT_TAG + + + $CI_COMMIT_MESSAGE" + -F parse_mode=html + https://api.telegram.org/bot${TG_BOT_TOKEN}/sendDocument