2019-11-28 23:05:33 +00:00
|
|
|
name: Build Pull Request
|
|
|
|
|
2023-03-08 02:59:21 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/ISSUE_TEMPLATE/*.yml'
|
|
|
|
- '.idea/copyright/*.xml'
|
|
|
|
- '.gitignore'
|
|
|
|
- 'CONTRIBUTING.md'
|
|
|
|
- 'LICENSE'
|
|
|
|
- 'Jenkinsfile '
|
|
|
|
- 'README.md'
|
|
|
|
- 'licenseheader.txt'
|
2019-11-28 23:05:33 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-12 14:24:53 +00:00
|
|
|
- name: Set up JDK 17
|
2019-11-28 23:05:33 +00:00
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2022-07-12 14:24:53 +00:00
|
|
|
java-version: 17
|
2023-02-17 19:37:01 +00:00
|
|
|
distribution: temurin
|
|
|
|
|
|
|
|
- name: Check if the author has forked the API repo
|
|
|
|
uses: Kas-tle/ForkFinder@v1.0.1
|
|
|
|
id: find_forks
|
|
|
|
with:
|
|
|
|
owner: GeyserMC
|
|
|
|
repo: api
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Use author's API repo if it exists
|
|
|
|
if: steps.find_forks.outputs.target_branch_found == 'true'
|
|
|
|
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
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
path: geyser
|
|
|
|
|
|
|
|
- name: Build Geyser
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
with:
|
|
|
|
arguments: build
|
|
|
|
build-root-directory: geyser
|
2022-10-17 00:21:29 +00:00
|
|
|
|
|
|
|
- name: Archive artifacts (Geyser Fabric)
|
2023-03-08 02:59:21 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-10-17 00:21:29 +00:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Fabric
|
2023-02-22 14:11:06 +00:00
|
|
|
path: geyser/bootstrap/fabric/build/libs/Geyser-Fabric.jar
|
2023-03-08 02:59:21 +00:00
|
|
|
if-no-files-found: error
|
2020-03-05 08:21:23 +00:00
|
|
|
- name: Archive artifacts (Geyser Standalone)
|
2023-03-08 02:59:21 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2019-11-28 23:05:33 +00:00
|
|
|
if: success()
|
|
|
|
with:
|
2020-03-05 08:21:23 +00:00
|
|
|
name: Geyser Standalone
|
2023-02-22 14:11:06 +00:00
|
|
|
path: geyser/bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
2023-03-08 02:59:21 +00:00
|
|
|
if-no-files-found: error
|
2020-05-26 14:47:34 +00:00
|
|
|
- name: Archive artifacts (Geyser Spigot)
|
2023-03-08 02:59:21 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-03-05 08:21:23 +00:00
|
|
|
if: success()
|
|
|
|
with:
|
2020-05-26 14:47:34 +00:00
|
|
|
name: Geyser Spigot
|
2023-02-22 14:11:06 +00:00
|
|
|
path: geyser/bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
2023-03-08 02:59:21 +00:00
|
|
|
if-no-files-found: error
|
2020-03-05 08:21:23 +00:00
|
|
|
- name: Archive artifacts (Geyser BungeeCord)
|
2023-03-08 02:59:21 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-03-05 08:21:23 +00:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser BungeeCord
|
2023-02-22 14:11:06 +00:00
|
|
|
path: geyser/bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
2023-03-08 02:59:21 +00:00
|
|
|
if-no-files-found: error
|
2020-03-05 08:21:23 +00:00
|
|
|
- name: Archive artifacts (Geyser Sponge)
|
2023-03-08 02:59:21 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-03-05 08:21:23 +00:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Sponge
|
2023-02-22 14:11:06 +00:00
|
|
|
path: geyser/bootstrap/sponge/build/libs/Geyser-Sponge.jar
|
2023-03-08 02:59:21 +00:00
|
|
|
if-no-files-found: error
|
2020-03-05 08:21:23 +00:00
|
|
|
- name: Archive artifacts (Geyser Velocity)
|
2023-03-08 02:59:21 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-03-05 08:21:23 +00:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Velocity
|
2023-02-22 14:11:06 +00:00
|
|
|
path: geyser/bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
2023-03-08 02:59:21 +00:00
|
|
|
if-no-files-found: error
|