forked from alashow/datmusic-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitrise.yml
110 lines (105 loc) · 3.31 KB
/
bitrise.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
format_version: '6'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: android
trigger_map:
- push_branch: "*"
workflow: primary
- pull_request_source_branch: "*"
workflow: primary
- tag: v*
workflow: publish
workflows:
primary:
steps:
- script:
title: Activates Java 11
inputs:
- content: |-
sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
export JAVA_HOME='/usr/lib/jvm/java-11-openjdk-amd64'
envman add --key JAVA_HOME --value '/usr/lib/jvm/java-11-openjdk-amd64'
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
- cache-pull: {}
- install-missing-android-tools:
inputs:
- gradlew_path: "$PROJECT_LOCATION/gradlew"
- script:
title: Descrypts signing files
inputs:
- content: |-
#!/bin/bash
set -e -x
./signing/decrypt.sh $SIGNING_KEY
- android-build:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- cache_level: all
- variant: "$BUILD_VARIANT"
- sign-apk:
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
- script:
is_always_run: true
title: Cleans up decrypted signing files
inputs:
- content: |-
#!/bin/bash
set -e -x
./signing/cleanup.sh
- deploy-to-bitrise-io: {}
- cache-push: {}
publish:
steps:
- script:
title: Activates Java 11
inputs:
- content: |-
sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
export JAVA_HOME='/usr/lib/jvm/java-11-openjdk-amd64'
envman add --key JAVA_HOME --value '/usr/lib/jvm/java-11-openjdk-amd64'
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
- cache-pull: {}
- install-missing-android-tools:
inputs:
- gradlew_path: "$PROJECT_LOCATION/gradlew"
- android-lint:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- variant: "$TEST_VARIANT"
- script:
title: Publishes the app to play store, to $PUBLISH_TRACK (default is production)
track
inputs:
- content: |-
#!/bin/bash
set -e -x
./signing/decrypt.sh $SIGNING_KEY
./gradlew publishRelease
./signing/cleanup.sh
- deploy-to-bitrise-io: {}
- cache-push: {}
app:
envs:
- opts:
is_expand: false
PROJECT_LOCATION: "."
- opts:
is_expand: false
MODULE: app
- opts:
is_expand: false
BUILD_VARIANT: Release
- opts:
is_expand: false
TEST_VARIANT: Debug
- opts:
is_expand: false
PUBLISH_TRACK: production