diff --git a/.github/workflows/javasteam-build-pr.yml b/.github/workflows/javasteam-build-pr.yml new file mode 100644 index 00000000..32e36193 --- /dev/null +++ b/.github/workflows/javasteam-build-pr.yml @@ -0,0 +1,34 @@ +# 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 +# Artifacts: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts + +name: Java PR CI/CD + +on: + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Checkout JavaSteam with Java 8 + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'temurin' + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Build with Gradle, skip signing + uses: gradle/gradle-build-action@v2 + with: + arguments: build -x signMavenJavaPublication diff --git a/.github/workflows/javasteam-build.yml b/.github/workflows/javasteam-build-push.yml similarity index 94% rename from .github/workflows/javasteam-build.yml rename to .github/workflows/javasteam-build-push.yml index 3b4d3498..53ea1359 100644 --- a/.github/workflows/javasteam-build.yml +++ b/.github/workflows/javasteam-build-push.yml @@ -6,13 +6,11 @@ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle # Artifacts: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts -name: Java CI/CD +name: Java Push CI/CD on: push: branches: [ "master" ] - pull_request: - branches: [ "master" ] permissions: contents: read @@ -35,6 +33,7 @@ jobs: with: arguments: build -x signMavenJavaPublication - uses: actions/upload-artifact@v3 + if: github.event_name != 'pull_request' with: name: JavaSteam path: build/libs