46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Build PR
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
java: [16]
|
|
fail-fast: true
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK ${{ matrix.java }}
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: ${{ matrix.java }}
|
|
distribution: 'adopt'
|
|
|
|
- name: Cache gradle
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/jdks
|
|
~/.gradle/native
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-parchment-2-${{ hashFiles('**/*.gradle*', 'gradle/**', 'gradle.properties') }}
|
|
restore-keys: ${{ runner.os }}-parchment-2
|
|
|
|
- name: Patch Parchment
|
|
run: |
|
|
git config --global user.email "no-reply@github.com"
|
|
git config --global user.name "GitHub Actions"
|
|
./gradlew applyPatches
|
|
./gradlew reobfJar
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Parchment-PR${{ github.event.pull_request.number }}-JDK${{ matrix.java }}
|
|
path: parchment-paperclip.jar
|