-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
57 lines (49 loc) · 1.28 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
57 lines (49 loc) · 1.28 KB
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
image: code0987/android-ci:latest
before_script:
# Git
- git config --global user.email 'devbot@ilusons.com'
- git config --global user.name 'Dev Bot'
- git submodule update --init --recursive
- git submodule update --recursive --remote
# Keys
## GPG
- export GPG_TTY=/dev/console
- echo "$GPG_PRIVATE_KEY" | gpg --batch --import
- git config --global user.signingkey $GPG_PRIVATE_KEY_ID
- git config --global commit.gpgsign true
- git secret reveal
## SSH
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "StrictHostKeyChecking no" >> ~/.ssh/config
- echo "UserKnownHostsFile /dev/null" >> ~/.ssh/config
# Setup
- npm install
- export GRADLE_USER_HOME=`pwd`./src/.gradle
- chmod +x ./src/gradlew
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- ./src/.gradle/
- ./src/build/
- ./src/mobile/build/
stages:
- test
- publish
test:
stage: test
script:
- ./src/gradlew -p ./src bundleReleaseBeta
artifacts:
expire_in: 7 days
paths:
- ./src/mobile/build/outputs/apk/*/**.apk
publish:
stage: publish
only:
- master
script:
- npx semantic-release