-
Notifications
You must be signed in to change notification settings - Fork 9
126 lines (102 loc) · 3.65 KB
/
android.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Android CI
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: burrunan/gradle-cache-action@v1
name: Build with Gradle
with:
job-id: android
arguments: build
- name: List Files
run: find .
- name: Upload debug APK
uses: actions/[email protected]
with:
name: sampleapp-debug.apk
path: sampleapp/build/outputs/apk/debug/sampleapp-debug.apk
- name: Upload release (unsigned) APK
uses: actions/[email protected]
with:
name: sampleapp-release-unsigned.apk
path: sampleapp/build/outputs/apk/release/sampleapp-release-unsigned.apk
- uses: burrunan/gradle-cache-action@v1
name: Publish local artifacts with Gradle
with:
job-id: android
arguments: publishToMavenLocal
- name: List Files in m2
run: find ~/.m2
- name: Upload m2 androidLib AAR
uses: actions/[email protected]
with:
name: pumpx2-android.aar
path: ~/.m2/repository/com/jwoglom/pumpx2/pumpx2-android/*/pumpx2-android-[0-9.]*.aar
- name: Upload m2 androidLib source JAR
uses: actions/[email protected]
with:
name: pumpx2-android-sources.jar
path: ~/.m2/repository/com/jwoglom/pumpx2/pumpx2-android/*/pumpx2-android-[0-9.]*-sources.jar
- name: Upload m2 messages JAR
uses: actions/[email protected]
with:
name: pumpx2-messages.jar
path: ~/.m2/repository/com/jwoglom/pumpx2/pumpx2-messages/*/pumpx2-messages-[0-9.]*.jar
- name: Upload m2 shared JAR
uses: actions/[email protected]
with:
name: pumpx2-shared.jar
path: ~/.m2/repository/com/jwoglom/pumpx2/pumpx2-shared/*/pumpx2-shared-[0-9.]*.jar
- name: Upload m2 messages fat JAR
uses: actions/[email protected]
with:
name: pumpx2-messages-all.jar
path: ~/.m2/repository/com/jwoglom/pumpx2/pumpx2-messages/*/pumpx2-messages-[0-9.]*-all.jar
- name: Upload m2 messages source JAR
uses: actions/[email protected]
with:
name: pumpx2-messages-sources.jar
path: ~/.m2/repository/com/jwoglom/pumpx2/pumpx2-messages/*/pumpx2-messages-[0-9.]*-sources.jar
- name: Upload m2 cliparser fat JAR
uses: actions/[email protected]
with:
name: pumpx2-cliparser-all.jar
path: ~/.m2/repository/com/jwoglom/pumpx2/pumpx2-cliparser/*/pumpx2-cliparser-[0-9.]*-all.jar
- name: Upload generated m2 repository
uses: actions/[email protected]
with:
name: maven-repository.zip
path: |
~/.m2/repository/
- uses: burrunan/gradle-cache-action@v1
name: Unit Test
with:
job-id: android
arguments: testDebugUnitTest
- name: Android Test Report
uses: asadmansr/[email protected]
if: ${{ always() }} # IMPORTANT: run Android Test Report regardless
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
# - uses: burrunan/gradle-cache-action@v1
# name: Run Gradle Publish (Snapshot)
# env:
# USERNAME: ${{ secrets.USERNAME }}
# TOKEN: ${{ secrets.TOKEN }}
# with:
# job-id: android
# arguments: publishAllPublicationsToGitHubPackagesRepository