From df0c87fcb1f1ee81a43af4e6bb8abfe4a6957d71 Mon Sep 17 00:00:00 2001 From: Nishant Srivastava Date: Thu, 20 Mar 2025 18:43:50 +0100 Subject: [PATCH 1/5] update build github action --- .github/workflows/build.yml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e47b008..b1686c37 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,25 +8,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: '17' - distribution: 'temurin' + java-version: "17" + distribution: "temurin" - - name: Cache Gradle packages - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: Build run: ./gradlew check jacoco assemble - - - name: Codecov - uses: codecov/codecov-action@v3 From 265245c9afc5b8dbd7ab17537e93818d440479e2 Mon Sep 17 00:00:00 2001 From: Nishant Srivastava Date: Thu, 20 Mar 2025 18:44:09 +0100 Subject: [PATCH 2/5] added jitpack build to force jitpack to trigger a build whenever a commit lands on develop branch --- .github/workflows/jitpack-build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/jitpack-build.yml diff --git a/.github/workflows/jitpack-build.yml b/.github/workflows/jitpack-build.yml new file mode 100644 index 00000000..fc80fda9 --- /dev/null +++ b/.github/workflows/jitpack-build.yml @@ -0,0 +1,20 @@ +name: Force Jitpack Build + +on: + push: + branches: + - develop + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Trigger Jitpack Build + run: | + curl -X POST https://jitpack.io/api/builds \ + -d 'scm=github.com' \ + -d 'repo=nisrulz/AppAuth-Android' \ + -d 'branch=develop' From ec00a2276f962fc13241a343136a450d88f1a72d Mon Sep 17 00:00:00 2001 From: Nishant Srivastava Date: Thu, 20 Mar 2025 19:17:36 +0100 Subject: [PATCH 3/5] updated actions --- .github/workflows/build.yml | 15 ++++++++++++++- .github/workflows/jitpack-build.yml | 10 ++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1686c37..928d52c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,20 @@ --- name: build -on: [push, pull_request] +on: + # Allows to run this workflow when a commit it pushed to the branch + push: + paths-ignore: + - "**/*.md" + branches: + - develop + + # Allows to run this workflow when a Pull Request is made with the set target branch + pull_request: + paths-ignore: + - "**/*.md" + branches: + - develop jobs: build: diff --git a/.github/workflows/jitpack-build.yml b/.github/workflows/jitpack-build.yml index fc80fda9..7313e127 100644 --- a/.github/workflows/jitpack-build.yml +++ b/.github/workflows/jitpack-build.yml @@ -1,7 +1,17 @@ name: Force Jitpack Build on: + # Allows to run this workflow when a commit it pushed to the branch push: + paths-ignore: + - "**/*.md" + branches: + - develop + + # Allows to run this workflow when a Pull Request is made with the set target branch + pull_request: + paths-ignore: + - "**/*.md" branches: - develop From 3e9126d40b18e2d8dd2fe43363d0c377e59655b0 Mon Sep 17 00:00:00 2001 From: Nishant Srivastava Date: Fri, 21 Mar 2025 14:47:31 +0100 Subject: [PATCH 4/5] updated curl command in jitpack-build github action --- .github/workflows/jitpack-build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/jitpack-build.yml b/.github/workflows/jitpack-build.yml index 7313e127..69a2a377 100644 --- a/.github/workflows/jitpack-build.yml +++ b/.github/workflows/jitpack-build.yml @@ -24,7 +24,4 @@ jobs: - name: Trigger Jitpack Build run: | - curl -X POST https://jitpack.io/api/builds \ - -d 'scm=github.com' \ - -d 'repo=nisrulz/AppAuth-Android' \ - -d 'branch=develop' + curl https://jitpack.io/api/builds/com.github.nisrulz/AppAuth-Android/develop-SNAPSHOT From 79d5906113fe2ddcae936a50b9f89d0ae9b7b7ac Mon Sep 17 00:00:00 2001 From: Nishant Srivastava Date: Fri, 21 Mar 2025 14:49:43 +0100 Subject: [PATCH 5/5] added name to build github action --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 928d52c0..3925c097 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,5 @@ --- -name: build +name: Build Project on: # Allows to run this workflow when a commit it pushed to the branch