From 43e48652fb8ef87ca192e3511ba38419bb4acf25 Mon Sep 17 00:00:00 2001 From: allay Date: Tue, 23 Aug 2022 12:57:47 +0300 Subject: [PATCH 1/3] :construction_worker: Add artifact release CI configs --- .github/workflows/release.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f04e75f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Snapshot Release + +on: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+-SNAPSHOT + - v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-SNAPSHOT + - v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-[0-9a-zA-Z]+-SNAPSHOT +env: + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Cancel previous workflow runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - name: Checkout 🛎️ + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Run unit tests with Gradle + run: ./gradlew :opensrp-reporting:clean :opensrp-reporting:testDebugUnitTest --stacktrace + + - name: Generate & upload library snapshot artifact AAR (Android Archive) file + run: ./gradlew :opensrp-reporting:uploadArchives -PmavenLocal=false --stacktrace -PsonatypeUsername=${{ secrets.NEXUS_USERNAME }} -PsonatypePassword=${{ secrets.NEXUS_PASSWORD }} + + - name: Github Release + uses: softprops/action-gh-release@v1 + with: + prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }} \ No newline at end of file From 5d3a1b1cc84cebef7801d2c94f1cbd40725f0cc1 Mon Sep 17 00:00:00 2001 From: allay Date: Tue, 23 Aug 2022 18:48:38 +0300 Subject: [PATCH 2/3] :arrow_up: Update client-core version --- opensrp-reporting/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-reporting/build.gradle b/opensrp-reporting/build.gradle index f989e24..0296f15 100644 --- a/opensrp-reporting/build.gradle +++ b/opensrp-reporting/build.gradle @@ -95,7 +95,7 @@ artifacts { } dependencies { - implementation('org.smartregister:opensrp-client-core:4.3.22-SNAPSHOT@aar') { + implementation('org.smartregister:opensrp-client-core:5.0.0-SNAPSHOT@aar') { transitive = true exclude group: 'com.github.bmelnychuk', module: 'atv' exclude group: 'com.google.guava', module: 'guava' From c1b8d3a9158591bd10a05389b71997100bb56b55 Mon Sep 17 00:00:00 2001 From: allay Date: Wed, 24 Aug 2022 11:45:33 +0300 Subject: [PATCH 3/3] :construction_worker: Downgrade JDK version --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f04e75f..6c6e013 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,10 +27,10 @@ jobs: with: fetch-depth: 2 - - name: Set up JDK 11 + - name: Set up JDK 8 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 8 - name: Grant execute permission for gradlew run: chmod +x gradlew