diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml new file mode 100644 index 00000000..c603e3d3 --- /dev/null +++ b/.github/workflows/PR.yml @@ -0,0 +1,35 @@ +name: Pull Request Actions +on: + pull_request: + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: temurin + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Validate Gradle Wrapper Integrity + uses: gradle/wrapper-validation-action@v1 + + - name: Make Gradle wrapper executable + run: chmod +x ./gradlew + + - name: Build + run: ./gradlew build + + - name: Publish Artifacts on GitHub Actions + uses: actions/upload-artifact@v3 + with: + if-no-files-found: error + path: build/libs/ + name: CEI .jar files from PR diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b88d6681..9acdf128 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,9 @@ jobs: with: java-version: '17' distribution: temurin - cache: gradle + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 - name: Validate Gradle Wrapper Integrity uses: gradle/wrapper-validation-action@v1 @@ -28,4 +30,4 @@ jobs: env: MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} - run: ./gradlew build publishMods \ No newline at end of file + run: ./gradlew build publishMods