Skip to content

Commit

Permalink
Added CI for pull requests, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTas authored Apr 12, 2024
1 parent 942ed02 commit 235e1a7
Showing 1 changed file with 34 additions and 14 deletions.
48 changes: 34 additions & 14 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
name: Build Pull Request
on: pull_request
# 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: [pull_request]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 17
distribution: adopt
- name: Build
run: ./gradlew build
- name: Upload artifacts
uses: actions/[email protected]
with:
name: build-artifacts
path: build/libs
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle Wrapper
run: ./gradlew build

- name: Upload PR Artifact
uses: actions/upload-artifact@v4
with:
name: pull-request-build
path: build/libs/

0 comments on commit 235e1a7

Please sign in to comment.