From 7d3ba1e2e1282788469b18e6bd458b9a9c60af06 Mon Sep 17 00:00:00 2001 From: koxx12-dev <80456351+koxx12-dev@users.noreply.github.com> Date: Tue, 2 Jan 2024 18:13:50 +0000 Subject: [PATCH 1/2] Create gradle.yml --- .github/workflows/gradle.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..196033a --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,49 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3.5.2 + - name: Set up JDK 17 + uses: actions/setup-java@v4.0.0 + with: + java-version: '17' + distribution: 'temurin' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build with Gradle + uses: gradle/gradle-build-action@v2.11.0 + with: + arguments: build --stacktrace + - name: Upload Artifact + uses: actions/upload-artifact@v4.0.0 + with: + name: compiled + path: build/libs/*.jar From 6972025f928b9047cda7d47bb97a41e0c906a6a4 Mon Sep 17 00:00:00 2001 From: koxx12-dev <80456351+koxx12-dev@users.noreply.github.com> Date: Tue, 2 Jan 2024 18:17:54 +0000 Subject: [PATCH 2/2] Update gradle.yml --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 196033a..249e8ad 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -30,7 +30,7 @@ jobs: distribution: 'temurin' - name: Grant execute permission for gradlew run: chmod +x gradlew - - uses: actions/cache@v2 + - uses: actions/cache@v3.3.2 with: path: | ~/.gradle/caches