2021-05-01 22:37:24 +02:00
|
|
|
name: Build Pull Request
|
2019-12-16 15:23:00 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-11-25 21:24:24 +01:00
|
|
|
branches:
|
2021-05-01 22:37:24 +02:00
|
|
|
- mc/* # MC version updates
|
|
|
|
- pr/* # PR rebases
|
2019-12-16 15:23:00 +01:00
|
|
|
pull_request:
|
2020-11-25 21:24:24 +01:00
|
|
|
branches:
|
2019-12-16 15:23:00 +01:00
|
|
|
- 2.x
|
2021-05-01 22:37:24 +02:00
|
|
|
- mc/*
|
2021-12-15 21:20:06 +01:00
|
|
|
- dev/*
|
2019-12-16 15:23:00 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-11-25 21:24:24 +01:00
|
|
|
name: Build and upload
|
2019-12-16 15:23:00 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Git repo
|
2024-02-24 21:28:07 +01:00
|
|
|
uses: actions/checkout@v4
|
2020-11-25 21:24:24 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-05-19 13:34:00 +02:00
|
|
|
|
2023-06-15 01:27:01 +02:00
|
|
|
- name: Set up JDK 17
|
2024-02-24 21:28:07 +01:00
|
|
|
uses: actions/setup-java@v4
|
2019-12-16 15:23:00 +01:00
|
|
|
with:
|
2023-06-15 01:27:01 +02:00
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: 17
|
2021-05-19 13:34:00 +02:00
|
|
|
|
2023-06-15 01:27:01 +02:00
|
|
|
- name: Setup Gradle
|
2024-02-24 21:28:07 +01:00
|
|
|
uses: gradle/gradle-build-action@v3
|
2021-05-01 22:37:24 +02:00
|
|
|
|
2020-11-25 21:24:24 +01:00
|
|
|
- name: Build with Gradle
|
|
|
|
run: |
|
|
|
|
chmod +x gradlew
|
|
|
|
./gradlew build --stacktrace
|
2021-05-19 13:34:00 +02:00
|
|
|
|
2024-02-26 02:51:31 +01:00
|
|
|
- name: Publish JUnit report
|
|
|
|
uses: mikepenz/action-junit-report@v4
|
|
|
|
if: success() || failure() # Run even if the previous step fails
|
|
|
|
with:
|
|
|
|
report_paths: '**/build/test-results/test*/TEST-*.xml'
|
|
|
|
|
2021-05-01 22:37:24 +02:00
|
|
|
- name: Archive plugin jars on GitHub
|
2024-02-24 21:28:07 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-11-25 21:43:23 +01:00
|
|
|
with:
|
|
|
|
name: EssentialsX plugin jars
|
|
|
|
path: jars/
|