-
Notifications
You must be signed in to change notification settings - Fork 160
56 lines (48 loc) · 1.63 KB
/
build.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
name: build androidplot
on: [push]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set Up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Build and Test
run: ./gradlew testDebugUnitTest jacocoTestDebugUnitTestReport
- name: Build Release
env:
ENCODED: ${{ secrets.DEMOAPP_KEYSTORE }}
KEYSTORE: keystore.jks
KEY_ALIAS: Key0
KEYSTORE_PASSWORD: ${{ secrets.DEMOAPP_KEYSTORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.DEMOAPP_KEY_PASSWORD }}
run: |
echo $ENCODED | base64 -di > "${GITHUB_WORKSPACE}/demoapp/keystore.jks"
./gradlew assembleRelease
- name: Javadoc
run: ./gradlew javadoc
- name: Code Coverage
run: bash <(curl -s https://codecov.io/bash)
- uses: actions/upload-artifact@v3
with:
name: Core Library
path: androidplot-core/build/outputs/aar/*.aar
retention-days: 30
- uses: actions/upload-artifact@v3
if: github.ref_name == 'master'
with:
name: Demoapp APK
path: demoapp/build/outputs/apk/release/*.apk
retention-days: 30
- name: Stage for Maven Central
if: github.ref_name == 'master'
env:
OSSRH_ACTOR: ${{ secrets.OSSRH_ACTOR }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
run: ./gradlew publish