forked from novasamatech/parity-signer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
57 lines (51 loc) · 1.23 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
# .gitlab-ci.yml
#
# parity-signer
#
# pipelines can be triggered manually in the web
stages:
- build
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: 100
default:
cache: {}
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
- api_failure
# workflow:
# rules:
# - if: $CI_COMMIT_TAG
# - if: $CI_COMMIT_BRANCH
android-build:
stage: build
image: paritytech/signer-android-builder:latest
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
artifacts:
paths:
- android/app/build/outputs/apk/release/app-release-unsigned.apk
script:
- ./scripts/build.sh android
- cd android; ./gradlew assembleRelease
tags:
- linux-docker
android-build-and-sign:
stage: build
image: paritytech/signer-android-builder:latest
rules:
- if: $CI_COMMIT_REF_NAME == "master"
artifacts:
paths:
- signer-ci-build.apk
script:
- cat "$KEYSTORE_DATA" | base64 -d > /tmp/gitlab-ci.keystore
- wc /tmp/gitlab-ci.keystore
- ./scripts/build.sh android
- cd android; ./gradlew assembleRelease; cd ..
- ./scripts/sign_android.sh /tmp/gitlab-ci.keystore "$KEYSTORE_PASS"
tags:
- linux-docker