Improved CI workflow

* Used latest @v2 action for setting up java for the CI instead of @v1.
* Used single command of gradle instead of multiple commands of gradle for `Compile and prepare package` task, because gradle will automatically execute all tasks one by one.
This commit is contained in:
MohitMali 2023-07-28 11:38:37 +05:30
parent fbf2c43aab
commit 8dd4c86ca6
2 changed files with 3 additions and 5 deletions

View File

@ -16,8 +16,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
- name: Install dependencies

View File

@ -22,10 +22,7 @@ jobs:
run: bash ./install_deps.sh
- name: Compile and prepare package
run: |
./gradlew buildHeaders build
./gradlew assemble
./gradlew androidSourcesJar
run: ./gradlew buildHeaders build assemble androidSourcesJar
- name: Publish
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository