-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodemagic.yaml
52 lines (42 loc) · 1.39 KB
/
codemagic.yaml
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
workflows:
android-build-workflow:
name: Build Android APK
labels:
- QA
# You can remove TENANT_NAME if not needed
# - ${TENANT_NAME}
instance_type: mac_mini_m2
max_build_duration: 60 # Max build duration in minutes
inputs:
tenant_name:
description: The tenant name for this build
default: Codemagic
environment:
vars:
PUBLIC_ENV_VAR: "value here" # Define any necessary environment variables here
cache:
cache_paths:
- ~/.gradle/caches # Caching Gradle dependencies for faster builds
triggering:
events:
- push
branch_patterns:
- pattern: '*'
include: true
source: true
cancel_previous_builds: false
scripts:
# Ensure Gradle is executable and perform the build
- chmod +x gradlew
- ./gradlew clean # Clean the project to ensure no stale files
- ./gradlew assembleDebug # Build the debug APK (you were using assembleRelease earlier, which is for release APK)
- echo "Build completed" # Confirmation message after build
artifacts:
# Location of the debug APK
- app/build/outputs/apk/debug/app-debug.apk
publishing:
email:
recipients:
- shashidadsena30@gmail.com # Update this with your email address to get notifications
scripts:
- echo 'Post-publish script executed'