From eff574e0bcf4957e6199bc38e9106558bb99ba1b Mon Sep 17 00:00:00 2001 From: Masoud Darvishian Date: Thu, 9 May 2024 12:50:31 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..97657ae --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Java CI with Gradle + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 14 + uses: actions/setup-java@v3 + with: + java-version: '14.0.2' + distribution: 'adopt' + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build and Test + run: ./gradlew build