From 8dd4c86ca6a85aca9cd511fa81f30c91558bf1fb Mon Sep 17 00:00:00 2001 From: MohitMali Date: Fri, 28 Jul 2023 11:38:37 +0530 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 3 ++- .github/workflows/publish.yml | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 497f8cf..20c66b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 66a1a3c..d5800e7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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