-
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (85 loc) · 2.77 KB
/
debug-build.yml
File metadata and controls
95 lines (85 loc) · 2.77 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Debug build APK
on:
pull_request_target:
branches:
- "main"
paths-ignore:
- ".gitignore"
- "**.md"
- "LICENSE"
- ".idea/**"
- ".editorconfig"
- "images/**"
- "metadata/**"
jobs:
run:
name: Build debug APK
runs-on: macos-14
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: "oracle"
java-version: "17"
cache: "gradle"
- name: Create dummy google-services.json for CI
run: |
echo '{
"project_info": {
"project_number": "123456789",
"project_id": "dummy-project-ci",
"storage_bucket": "dummy-project-ci.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:123456789:android:dummy",
"android_client_info": {
"package_name": "com.matrix.multigpt"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "dummy-api-key-for-ci"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}' > app/google-services.json
- name: Create dummy AdMob config for CI
run: |
mkdir -p app/src/main/res/values
echo '<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="admob_app_id">ca-app-pub-3940256099942544~3347511713</string>
<string name="home_banner">ca-app-pub-3940256099942544/6300978111</string>
<string name="setup_complete_interstitial">ca-app-pub-3940256099942544/1033173712</string>
</resources>' > app/src/main/res/values/ad_mob_config.xml
- name: Build debug APK
run: |
./gradlew assembleDebug
- name: Upload debug APK
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: debug-${{ github.sha }}
path: ${{ github.workspace }}/app/build/outputs/apk/debug/app-debug.apk
- name: Comment APK Link
uses: thollander/actions-comment-pull-request@v2
with:
comment_tag: apk
message: |
Build complete! Here's the debug APK: ${{ steps.artifact-upload-step.outputs.artifact-url }}