Skip to content

Commit 774e188

Browse files
committed
Add retry mechanism for Gradle build and skip tests during publish
1 parent 83e31cb commit 774e188

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/gradle.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ jobs:
2727
uses: gradle/actions/setup-gradle@v4
2828

2929
- name: Build with Gradle Wrapper
30-
run: ./gradlew build
30+
uses: nick-fields/retry@v3
31+
with:
32+
timeout_minutes: 10
33+
max_attempts: 3
34+
command: ./gradlew build
3135

3236
dependency-submission:
3337
runs-on: ubuntu-latest

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
uses: gradle/actions/setup-gradle@v4
2424

2525
- name: Build with Gradle Wrapper
26-
run: ./gradlew build
26+
run: ./gradlew build -x test
2727

2828
- name: Publish to Maven Repositories
29-
run: ./gradlew publish
29+
run: ./gradlew publish -x test
3030
env:
3131
USERNAME: ${{ github.actor }}
3232
TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)