mirror of
				https://gitlab.com/ceda_ei/sonzai.git
				synced 2025-11-04 09:00:05 +01:00 
			
		
		
		
	Add .gitlab-ci.yml
This commit is contained in:
		
							
								
								
									
										34
									
								
								.gitlab-ci.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								.gitlab-ci.yml
									
									
									
									
									
										Normal file
									
								
							@@ -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=" <b>Branch</b>: <code>$CI_COMMIT_BRANCH</code>
 | 
			
		||||
 | 
			
		||||
            <b>Commit</b>: <code>$CI_COMMIT_SHORT_SHA</code>
 | 
			
		||||
 | 
			
		||||
            <b>Tag(if any)</b>: <code>$CI_COMMIT_TAG</code>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            <code>$CI_COMMIT_MESSAGE</code>"
 | 
			
		||||
            -F parse_mode=html
 | 
			
		||||
            https://api.telegram.org/bot${TG_BOT_TOKEN}/sendDocument
 | 
			
		||||
		Reference in New Issue
	
	Block a user