-
Notifications
You must be signed in to change notification settings - Fork 47
/
.gitlab-ci.yml
58 lines (55 loc) · 1.91 KB
/
.gitlab-ci.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
stages:
- environment
- build
- test
- release
buildDebug:
image: mysteriumnetwork/mobile-ci:1.2.0
stage: build
tags: [docker]
except:
refs:
- tags
changes:
- "./fastlane/android_version_code"
before_script:
- bundle install
- echo "$GOOGLE_SERVICES_VALUE" | base64 --decode > "$GOOGLE_SERVICES_PATH"
script:
- bundle exec fastlane buildDebug
testDebug:
image: mysteriumnetwork/mobile-ci:1.2.0
stage: test
tags: [docker]
except:
refs:
- tags
changes:
- "./fastlane/android_version_code"
dependencies:
- buildDebug
before_script:
- bundle install
- echo "$GOOGLE_SERVICES_VALUE" | base64 --decode > "$GOOGLE_SERVICES_PATH"
script:
- bundle exec fastlane test
publishInternal:
image: mysteriumnetwork/mobile-ci:1.2.0
stage: release
only: [tags]
tags: [docker]
before_script:
- bundle install
- echo "$FASTLANE_ANDROID_SIGNING_FILE_VALUE" | base64 --decode > "$FASTLANE_ANDROID_SIGNING_FILE_PATH"
- echo "$FASTLANE_ANDROID_SECRET_JSON_VALUE" | base64 --decode > "$FASTLANE_ANDROID_SECRET_JSON_PATH"
- echo "$GOOGLE_SERVICES_VALUE" | base64 --decode > "$GOOGLE_SERVICES_PATH"
script:
- bundle exec fastlane internal
- bundle exec fastlane build
- apt update; apt install -y jq
- RELEASE_ID=$(curl -s -H "Authorization:token $GITHUB_API_TOKEN" https://api.github.com/repos/mysteriumnetwork/mysterium-vpn-mobile/releases/tags/$CI_COMMIT_TAG | jq -r .id)
- curl --data-binary @android/app/build/outputs/apk/crypto/release/app-crypto-release.apk -H "Authorization:token $GITHUB_API_TOKEN" -H "Content-Type:application/octet-stream" https://uploads.github.com/repos/mysteriumnetwork/mysterium-vpn-mobile/releases/$RELEASE_ID/assets?name=myst.apk
artifacts:
when: always
paths:
- /builds/mysteriumnetwork/mysterium-vpn-mobile/android/app/build/outputs/bundle/crypto/release/app-crypto-release.aab