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
2119 uses : actions/setup-java@v1
@@ -26,19 +24,17 @@ jobs:
2624 run : bash ./install_deps.sh
2725
2826 - name : Compile Project
29- run : |
30- ./gradlew buildHeaders build
27+ run : ./gradlew buildHeaders build
3128
32- - name : create unit coverage
33- run : |
34- ./gradlew createCodeCoverageReport
29+ - name : Create code coverage report
30+ run : ./gradlew createCodeCoverageReport
3531
36- - name : Upload coverage to Codecov
37- uses : codecov/codecov-action@v2
32+ - name : Upload code coverage to Codecov
33+ uses : codecov/codecov-action@v3
3834
3935 - name : Upload Coverage to GH-Actions
4036 uses : actions/upload-artifact@v2.2.0
41- if : ${{ always() }}
37+ if : ${{ always() }}
4238 with :
4339 name : Tests Coverage Report
4440 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,15 @@ jobs:
2821 - name : Install dependencies
2922 run : bash ./install_deps.sh
3023
31- - name : Compile Project
24+ - name : Compile and prepare package
3225 run : |
3326 ./gradlew buildHeaders build
34-
35- - name : Release build
36- run : |
3727 ./gradlew assemble
38-
39- - name : Generate Source jar
40- run : |
4128 ./gradlew androidSourcesJar
4229
43- - name : Publish to MavenCentral
30+ - name : Publish
4431 run : ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
32+ if : github.event_name == 'release'
4533 env :
4634 OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
4735 OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
You can’t perform that action at this time.
0 commit comments