-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.drone.jsonnet
More file actions
76 lines (74 loc) · 2.15 KB
/
.drone.jsonnet
File metadata and controls
76 lines (74 loc) · 2.15 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
local build() = {
kind: "pipeline",
name: "android",
platform: {
os: "linux",
arch: "amd64"
},
steps: [
{
name: "build",
image: "runmymind/docker-android-sdk:ubuntu-standalone-20240812",
environment: {
KEY_STORE: {
from_secret: "KEY_STORE"
},
ANDROID_STORE_FILE: {
from_secret: "ANDROID_STORE_FILE"
},
ANDROID_STORE_PASSWORD: {
from_secret: "ANDROID_STORE_PASSWORD"
},
ANDROID_KEY_ALIAS: {
from_secret: "ANDROID_KEY_ALIAS"
},
ANDROID_KEY_PASSWORD: {
from_secret: "ANDROID_KEY_PASSWORD"
},
},
commands: [
"sdkmanager 'build-tools;35.0.0'",
"./gradlew clean test assemble"
]
},
{
name: "publish to github",
image: "plugins/github-release:1.0.0",
settings: {
api_key: {
from_secret: "github_token"
},
files: "syncloud/build/outputs/apk/release/*",
overwrite: true,
file_exists: "overwrite"
},
when: {
event: [ "tag" ]
}
},
{
name: "artifact",
image: "appleboy/drone-scp",
settings: {
host: {
from_secret: "artifact_host"
},
username: "artifact",
key: {
from_secret: "artifact_key"
},
timeout: "2m",
command_timeout: "2m",
target: "/home/artifact/repo/android/${DRONE_BUILD_NUMBER}",
source: "syncloud/build/outputs/apk/release/*.apk",
strip_components: 5
},
when: {
status: [ "failure", "success" ]
}
}
]
};
[
build()
]