forked from osmandapp/OsmAnd
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (66 loc) · 2.1 KB
/
build-debug-apk.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
name: Build debug apk
on:
[workflow_dispatch]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout OsmAnd
uses: actions/checkout@v4
with:
path: android
- name: checkout OsmAnd-resources
uses: actions/checkout@v4
with:
repository: osmandapp/OsmAnd-resources
path: resources
- name: checkout OsmAnd-core
uses: actions/checkout@v4
with:
repository: osmandapp/OsmAnd-core
path: core
- name: checkout OsmAnd-core-legacy
uses: actions/checkout@v4
with:
repository: osmandapp/OsmAnd-core-legacy
path: core-legacy
- name: checkout OsmAnd-build
uses: actions/checkout@v4
with:
repository: osmandapp/OsmAnd-build
path: build
- name: checkout OsmAnd-tools
uses: actions/checkout@v4
with:
repository: osmandapp/OsmAnd-tools
path: tools
- name: checkout OsmAnd-misc
uses: actions/checkout@v4
with:
repository: osmandapp/OsmAnd-misc
path: misc
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
working-directory: ./android
run: chmod +x gradlew
- name: Patch memory requirements
working-directory: ./android
run: printf "\norg.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\n" >> gradle.properties
- name: Build with Gradle
working-directory: ./android
run: ./gradlew assembleNightlyFreeLegacyFatDebug
- name: Rename APK
working-directory: ./android
run: mv OsmAnd/build/outputs/apk/nightlyFreeLegacyFat/debug/OsmAnd-nightlyFree-legacy-fat-debug.apk OsmAnd/build/outputs/apk/nightlyFreeLegacyFat/debug/OsmAnd-nightlyFree-legacy-fat-debug-$(git log -n 1 --format='%h').apk
- name: Archive APK
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: android/OsmAnd/build/outputs/apk/*/*/*.apk
retention-days: 90