Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-12 19:10:19 +01:00
cf27b88cc8
* Switch to centralized GitHub actions * Update PR actions as well * Publish preview only if success * Webhook on success & failure
102 Zeilen
3.6 KiB
YAML
102 Zeilen
3.6 KiB
YAML
name: Build Remote
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
repository:
|
|
required: true
|
|
description: 'The repo of the remote'
|
|
type: string
|
|
ref:
|
|
required: true
|
|
description: 'The ref of the remote'
|
|
type: string
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set Build Number
|
|
run: |
|
|
echo "BUILD_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
|
|
|
- name: Setup Java
|
|
# See https://github.com/actions/setup-java/commits
|
|
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
|
with:
|
|
java-version: 21
|
|
distribution: temurin
|
|
|
|
- name: Checkout repository and submodules
|
|
# See https://github.com/actions/checkout/commits
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
|
with:
|
|
repository: ${{ inputs.repository }}
|
|
ref: ${{ inputs.ref }}
|
|
submodules: recursive
|
|
|
|
- name: Validate Gradle Wrapper
|
|
# See https://github.com/gradle/wrapper-validation-action/commits
|
|
uses: gradle/actions/wrapper-validation@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
|
|
|
- name: Setup Gradle
|
|
# See https://github.com/gradle/actions/commits
|
|
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
|
with:
|
|
cache-read-only: true
|
|
|
|
- name: Build Geyser
|
|
run: ./gradlew build
|
|
|
|
- name: Archive artifacts (Geyser Fabric)
|
|
# See https://github.com/actions/upload-artifact/commits
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
|
if: success()
|
|
with:
|
|
name: Geyser Fabric
|
|
path: geyser/bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
|
if-no-files-found: error
|
|
- name: Archive artifacts (Geyser NeoForge)
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
|
if: success()
|
|
with:
|
|
name: Geyser NeoForge
|
|
path: geyser/bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
|
if-no-files-found: error
|
|
- name: Archive artifacts (Geyser Standalone)
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
|
if: success()
|
|
with:
|
|
name: Geyser Standalone
|
|
path: geyser/bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
|
if-no-files-found: error
|
|
- name: Archive artifacts (Geyser Spigot)
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
|
if: success()
|
|
with:
|
|
name: Geyser Spigot
|
|
path: geyser/bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
|
if-no-files-found: error
|
|
- name: Archive artifacts (Geyser BungeeCord)
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
|
if: success()
|
|
with:
|
|
name: Geyser BungeeCord
|
|
path: geyser/bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
|
if-no-files-found: error
|
|
- name: Archive artifacts (Geyser Velocity)
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
|
if: success()
|
|
with:
|
|
name: Geyser Velocity
|
|
path: geyser/bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
|
if-no-files-found: error
|
|
- name: Archive artifacts (Geyser ViaProxy)
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
|
if: success()
|
|
with:
|
|
name: Geyser ViaProxy
|
|
path: geyser/bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
|
if-no-files-found: error |