From 9cdc2f9c9317660daae515432ad39c5456b37add Mon Sep 17 00:00:00 2001 From: Thor Tudal Lauridsen Date: Sun, 23 Mar 2025 20:08:05 +0100 Subject: [PATCH] ci: Add .github/workflows/gradle-build.yml Add `.github/workflows/gradle-build.yml` which will build the Gradle project and run tests by: - Checking out the repository - Setup Java - Setting up the Gradle action `gradle/actions/setup-gradle@v4.3.0` - Making `gradlew` executable - Running `./gradlew build` which includes running tests --- .github/workflows/gradle-build.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/gradle-build.yml diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml new file mode 100644 index 0000000..c1d1f9f --- /dev/null +++ b/.github/workflows/gradle-build.yml @@ -0,0 +1,31 @@ +name: Gradle Build + +on: + push: + branches: + - main # Runs on pushes to main branch + pull_request: + branches: + - main # Runs on pull requests for merging into main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 + + - name: Use gradle/actions/setup-gradle@v4.3.0 + uses: gradle/actions/setup-gradle@v4.3.0 + + - name: Make gradlew executable + run: chmod +x ./gradlew + + - name: Build with Gradle + run: ./gradlew build