File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Pull requests
1+ name : CI
22
33on :
44 pull_request :
77 - main
88
99jobs :
10-
11- build_job :
12- name : Build Pull Request
10+ Build :
11+ name : Build & test source code
1312 runs-on : ubuntu-20.04
1413
1514 steps :
16- - uses : actions/checkout@v1
17- with :
18- fetch-depth : 1
15+ - name : Checkout code
16+ uses : actions/checkout@v3
1917
2018 - name : Set up JDK 11
21- uses : actions/setup-java@v1
19+ uses : actions/setup-java@v2
2220 with :
21+ distribution : adopt
2322 java-version : 11
2423
2524 - name : Install dependencies
2625 run : bash ./install_deps.sh
2726
2827 - name : Compile Project
29- run : |
30- ./gradlew buildHeaders build
28+ run : ./gradlew buildHeaders build
3129
32- - name : create unit coverage
33- run : |
34- ./gradlew createCodeCoverageReport
30+ - name : Create code coverage report
31+ run : ./gradlew createCodeCoverageReport
3532
36- - name : Upload coverage to Codecov
37- uses : codecov/codecov-action@v2
33+ - name : Upload code coverage to Codecov
34+ uses : codecov/codecov-action@v3
3835
3936 - name : Upload Coverage to GH-Actions
4037 uses : actions/upload-artifact@v2.2.0
41- if : ${{ always() }}
38+ if : ${{ always() }}
4239 with :
4340 name : Tests Coverage Report
4441 path : |
Original file line number Diff line number Diff line change 1- name : Build Java-LibKiwix
1+ name : Publish to Maven Central
22
33on :
4- push :
5- branches-ignore :
6- - ' *'
7- - ' */**'
8- tags :
9- - ' *'
10- - ' */**'
4+ release :
5+ types : [published]
116
127jobs :
138 publish :
14-
159 runs-on : ubuntu-20.04
1610
1711 steps :
18- - uses : actions/checkout@v2
19- with :
20- fetch-depth : 1
12+ - name : Checkout code
13+ uses : actions/checkout@v3
2114
2215 - name : Set up JDK 11
2316 uses : actions/setup-java@v2
@@ -28,20 +21,12 @@ jobs:
2821 - name : Install dependencies
2922 run : bash ./install_deps.sh
3023
31- - name : Compile Project
32- run : |
33- ./gradlew buildHeaders build
34-
35- - name : Release build
36- run : |
37- ./gradlew assemble
38-
39- - name : Generate Source jar
40- run : |
41- ./gradlew androidSourcesJar
24+ - name : Compile and prepare package
25+ run : ./gradlew buildHeaders build assemble androidSourcesJar
4226
43- - name : Publish to MavenCentral
27+ - name : Publish
4428 run : ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
29+ if : github.event_name == 'release'
4530 env :
4631 OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
4732 OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
You can’t perform that action at this time.
0 commit comments