diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..57b8548 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,45 @@ +# 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: [ "dev" ] + pull_request: + branches: [ "dev" ] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4.2.1 + with: + java-version: '21' + distribution: 'temurin' + cache: "gradle" + - name: Configure Git User Details + run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" + + - name: Allow execution of gradlew + run: chmod +x ./gradlew + + - name: Execute Gradle build + run: ./gradlew build --no-daemon --stacktrace + + - name: Upload nvidium JAR + uses: actions/upload-artifact@v4 + with: + name: nvidium + path: build/libs/nvidium*.jar + if-no-files-found: error