This repository has been archived by the owner on Feb 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
/
circle.yml
85 lines (69 loc) · 2.01 KB
/
circle.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: 2.0
references:
container_config: &container_config
docker:
- image: menny/android:1.9.8
working_directory:
/opt/workspace/
environment:
TERM: dumb
general_cache_key: &general_cache_key
key: anysoftkeyboard-api-{{ checksum "api/build.gradle" }}-{{ checksum "build.gradle" }}-{{ checksum "circle.yml" }}-{{ checksum "gradle.properties" }}-{{ checksum "settings.gradle" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
jobs:
build_check:
<<: *container_config
steps:
- checkout
- restore_cache:
<<: *general_cache_key
- run:
name: Setup environment
command: scripts/ci_setup.sh
- run:
name: Initial build
command: scripts/ci_assemble.sh
- run:
name: Run Checks
command: ./scripts/ci_check.sh
- store_artifacts:
path: /opt/workspace/api/build/reports/lint/*.html
destination: lint_reports/
- save_cache:
<<: *general_cache_key
paths:
- "~/.gradle"
- "~/.m2"
- "/opt/android-sdk-linux/licenses/"
deploy_to_maven:
<<: *container_config
steps:
- checkout
- restore_cache:
<<: *general_cache_key
- run:
name: Deploy to Bintray
command: |
./gradlew --no-daemon --stacktrace bintrayUpload -PdryRun=false
tag_at_repo:
<<: *container_config
steps:
- checkout
- run:
name: Tagging successful build
command: |
git config --global user.email "[email protected]"
git config --global user.name "Circle CI"
git tag -a `cat .generated_pack_version` -m "Deployed"
git push --tags origin
workflows:
version: 2
build_check_deploy:
jobs:
- build_check
- deploy_to_maven:
filters:
branches:
only:
- master
requires:
- build_check