2019-11-29 00:05:33 +01:00
|
|
|
name: Build Pull Request
|
|
|
|
|
2023-03-08 03:59:21 +01:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/ISSUE_TEMPLATE/*.yml'
|
|
|
|
- '.idea/copyright/*.xml'
|
|
|
|
- '.gitignore'
|
|
|
|
- 'CONTRIBUTING.md'
|
|
|
|
- 'LICENSE'
|
|
|
|
- 'Jenkinsfile '
|
|
|
|
- 'README.md'
|
|
|
|
- 'licenseheader.txt'
|
2019-11-29 00:05:33 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-12 16:24:53 +02:00
|
|
|
- name: Set up JDK 17
|
2023-09-13 16:46:45 +02:00
|
|
|
# See https://github.com/actions/setup-java/commits
|
|
|
|
uses: actions/setup-java@4075bfc1b51bf22876335ae1cd589602d60d8758
|
2019-11-29 00:05:33 +01:00
|
|
|
with:
|
2022-07-12 16:24:53 +02:00
|
|
|
java-version: 17
|
2023-02-17 20:37:01 +01:00
|
|
|
distribution: temurin
|
|
|
|
|
|
|
|
- name: Check if the author has forked the API repo
|
2023-09-13 16:46:45 +02:00
|
|
|
# See https://github.com/Kas-tle/find-forks-action/commits
|
|
|
|
uses: Kas-tle/find-forks-action@1b5447d1e3c7a8ed79583dd817cc5399686eed3a
|
2023-02-17 20:37:01 +01:00
|
|
|
id: find_forks
|
|
|
|
with:
|
|
|
|
owner: GeyserMC
|
|
|
|
repo: api
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Use author's API repo if it exists
|
2023-06-18 23:45:59 +02:00
|
|
|
if: ${{ steps.find_forks.outputs.target_branch_found == 'true' }}
|
2023-02-17 20:37:01 +01:00
|
|
|
env:
|
|
|
|
API_FORK_URL: ${{ steps.find_forks.outputs.user_fork_url }}
|
|
|
|
API_FORK_BRANCH: ${{ github.event.pull_request.head.ref }}
|
|
|
|
run: |
|
|
|
|
git clone "${API_FORK_URL}" --single-branch --branch "${API_FORK_BRANCH}" api
|
|
|
|
cd api
|
|
|
|
./gradlew publishToMavenLocal
|
|
|
|
|
|
|
|
- name: Checkout repository and submodules
|
2023-09-13 16:46:45 +02:00
|
|
|
# See https://github.com/actions/checkout/commits
|
|
|
|
uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9
|
2023-02-17 20:37:01 +01:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
path: geyser
|
|
|
|
|
2023-09-13 16:46:45 +02:00
|
|
|
- name: Validate Gradle Wrapper
|
|
|
|
# See https://github.com/gradle/wrapper-validation-action/commits
|
|
|
|
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
|
|
|
|
|
2023-02-17 20:37:01 +01:00
|
|
|
- name: Build Geyser
|
2023-09-13 16:46:45 +02:00
|
|
|
# See https://github.com/gradle/gradle-build-action/commits
|
|
|
|
uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
|
2023-02-17 20:37:01 +01:00
|
|
|
with:
|
|
|
|
arguments: build
|
|
|
|
build-root-directory: geyser
|
2022-10-17 02:21:29 +02:00
|
|
|
|
|
|
|
- name: Archive artifacts (Geyser Fabric)
|
2023-09-13 16:46:45 +02:00
|
|
|
# See https://github.com/actions/upload-artifact/commits
|
|
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
|
2022-10-17 02:21:29 +02:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Fabric
|
2023-02-22 15:11:06 +01:00
|
|
|
path: geyser/bootstrap/fabric/build/libs/Geyser-Fabric.jar
|
2023-03-08 03:59:21 +01:00
|
|
|
if-no-files-found: error
|
2020-03-05 09:21:23 +01:00
|
|
|
- name: Archive artifacts (Geyser Standalone)
|
2023-09-13 16:46:45 +02:00
|
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
|
2019-11-29 00:05:33 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
2020-03-05 09:21:23 +01:00
|
|
|
name: Geyser Standalone
|
2023-02-22 15:11:06 +01:00
|
|
|
path: geyser/bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
2023-03-08 03:59:21 +01:00
|
|
|
if-no-files-found: error
|
2020-05-26 16:47:34 +02:00
|
|
|
- name: Archive artifacts (Geyser Spigot)
|
2023-09-13 16:46:45 +02:00
|
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
|
2020-03-05 09:21:23 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
2020-05-26 16:47:34 +02:00
|
|
|
name: Geyser Spigot
|
2023-02-22 15:11:06 +01:00
|
|
|
path: geyser/bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
2023-03-08 03:59:21 +01:00
|
|
|
if-no-files-found: error
|
2020-03-05 09:21:23 +01:00
|
|
|
- name: Archive artifacts (Geyser BungeeCord)
|
2023-09-13 16:46:45 +02:00
|
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
|
2020-03-05 09:21:23 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser BungeeCord
|
2023-02-22 15:11:06 +01:00
|
|
|
path: geyser/bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
2023-03-08 03:59:21 +01:00
|
|
|
if-no-files-found: error
|
2020-03-05 09:21:23 +01:00
|
|
|
- name: Archive artifacts (Geyser Velocity)
|
2023-09-13 16:46:45 +02:00
|
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
|
2020-03-05 09:21:23 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Velocity
|
2023-02-22 15:11:06 +01:00
|
|
|
path: geyser/bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
2023-03-08 03:59:21 +01:00
|
|
|
if-no-files-found: error
|