2023-02-25 03:05:15 +01:00
|
|
|
name: Build
|
|
|
|
|
2023-03-08 03:59:21 +01:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
2024-03-09 02:24:16 +01:00
|
|
|
branches-ignore:
|
|
|
|
- 'gh-readonly-queue/**'
|
2023-03-08 03:59:21 +01:00
|
|
|
paths-ignore:
|
|
|
|
- '.github/ISSUE_TEMPLATE/*.yml'
|
2024-04-21 04:07:39 +02:00
|
|
|
- '.github/workflows/build-remote.yml'
|
|
|
|
- '.github/workflows/preview.yml'
|
|
|
|
- '.github/workflows/pull-request.yml'
|
2024-03-04 23:37:45 +01:00
|
|
|
- '.idea/copyright/*.xml'
|
2023-03-08 03:59:21 +01:00
|
|
|
- '.gitignore'
|
|
|
|
- 'CONTRIBUTING.md'
|
|
|
|
- 'LICENSE'
|
|
|
|
- 'Jenkinsfile '
|
|
|
|
- 'README.md'
|
|
|
|
- 'licenseheader.txt'
|
2023-02-25 03:05:15 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-05-27 19:59:36 +02:00
|
|
|
- name: Get Release Info
|
|
|
|
id: release-info
|
|
|
|
uses: GeyserMC/actions/previous-release@master
|
|
|
|
with:
|
|
|
|
data: ${{ vars.RELEASEACTION_PREVRELEASE }}
|
2024-04-20 03:47:00 +02:00
|
|
|
|
2023-02-25 03:05:15 +01:00
|
|
|
- name: Checkout repository and submodules
|
2023-09-13 16:46:45 +02:00
|
|
|
# See https://github.com/actions/checkout/commits
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
2023-02-25 03:05:15 +01:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
2023-03-30 17:02:12 +02:00
|
|
|
- name: Validate Gradle Wrapper
|
2024-05-27 19:59:36 +02:00
|
|
|
# See https://github.com/gradle/actions/commits
|
|
|
|
uses: gradle/actions/wrapper-validation@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
2023-03-30 17:02:12 +02:00
|
|
|
|
2023-09-13 16:46:45 +02:00
|
|
|
# See https://github.com/actions/setup-java/commits
|
2024-05-27 19:59:36 +02:00
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
2023-02-25 03:05:15 +01:00
|
|
|
with:
|
2024-04-23 23:14:54 +02:00
|
|
|
java-version: 21
|
2023-02-25 03:05:15 +01:00
|
|
|
distribution: temurin
|
2023-03-08 03:59:21 +01:00
|
|
|
|
2024-05-27 19:59:36 +02:00
|
|
|
- name: Setup Gradle
|
2024-04-20 03:47:00 +02:00
|
|
|
# See https://github.com/gradle/actions/commits
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
2023-02-25 03:05:15 +01:00
|
|
|
with:
|
2023-03-30 17:02:12 +02:00
|
|
|
gradle-home-cache-cleanup: true
|
2024-05-27 19:59:36 +02:00
|
|
|
|
|
|
|
- name: Build Geyser
|
|
|
|
run: ./gradlew build
|
|
|
|
env:
|
|
|
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
2023-03-08 03:59:21 +01:00
|
|
|
|
|
|
|
- name: Archive artifacts (Geyser Fabric)
|
2023-09-13 16:46:45 +02:00
|
|
|
# See https://github.com/actions/upload-artifact/commits
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
2023-03-08 03:59:21 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Fabric
|
2024-02-23 17:58:39 +01:00
|
|
|
path: bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
|
|
|
if-no-files-found: error
|
|
|
|
- name: Archive artifacts (Geyser NeoForge)
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
2024-02-23 17:58:39 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser NeoForge
|
|
|
|
path: bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
2023-03-08 03:59:21 +01:00
|
|
|
if-no-files-found: error
|
|
|
|
- name: Archive artifacts (Geyser Standalone)
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
2023-03-08 03:59:21 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Standalone
|
|
|
|
path: bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
|
|
|
if-no-files-found: error
|
|
|
|
- name: Archive artifacts (Geyser Spigot)
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
2023-03-08 03:59:21 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Spigot
|
|
|
|
path: bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
|
|
|
if-no-files-found: error
|
|
|
|
- name: Archive artifacts (Geyser BungeeCord)
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
2023-03-08 03:59:21 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser BungeeCord
|
|
|
|
path: bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
|
|
|
if-no-files-found: error
|
|
|
|
- name: Archive artifacts (Geyser Velocity)
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
2023-03-08 03:59:21 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser Velocity
|
|
|
|
path: bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
|
|
|
if-no-files-found: error
|
2024-02-19 22:25:49 +01:00
|
|
|
- name: Archive artifacts (Geyser ViaProxy)
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
2024-02-19 22:25:49 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: Geyser ViaProxy
|
|
|
|
path: bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
|
|
|
if-no-files-found: error
|
2023-02-25 03:05:15 +01:00
|
|
|
|
|
|
|
- name: Publish to Maven Repository
|
2023-03-30 17:02:12 +02:00
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
2024-05-27 19:59:36 +02:00
|
|
|
run: ./gradlew publish
|
2023-02-25 03:05:15 +01:00
|
|
|
env:
|
2024-05-27 19:59:36 +02:00
|
|
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
2023-02-25 03:05:15 +01:00
|
|
|
ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
|
|
|
|
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
|
2024-05-27 19:59:36 +02:00
|
|
|
|
|
|
|
- name: Get Version
|
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
|
|
|
id: get-version
|
|
|
|
run: |
|
|
|
|
version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2)
|
|
|
|
echo "VERSION=${version}" >> $GITHUB_OUTPUT
|
2023-02-25 03:05:15 +01:00
|
|
|
|
2024-04-18 16:29:40 +02:00
|
|
|
- name: Get Release Metadata
|
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: GeyserMC/actions/release@master
|
|
|
|
id: metadata
|
2024-04-18 16:29:40 +02:00
|
|
|
with:
|
|
|
|
appID: ${{ secrets.RELEASE_APP_ID }}
|
|
|
|
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
|
|
|
|
files: |
|
|
|
|
bungeecord:bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
|
|
|
fabric:bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
|
|
|
neoforge:bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
|
|
|
spigot:bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
|
|
|
standalone:bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
|
|
|
velocity:bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
|
|
|
viaproxy:bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
|
|
|
releaseEnabled: false
|
|
|
|
saveMetadata: true
|
2024-05-27 19:59:36 +02:00
|
|
|
releaseProject: 'geyser'
|
|
|
|
releaseVersion: ${{ steps.get-version.outputs.VERSION }}
|
2023-02-25 03:05:15 +01:00
|
|
|
- name: Publish to Downloads API
|
2023-03-30 17:02:12 +02:00
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: GeyserMC/actions/upload-release@master
|
|
|
|
with:
|
|
|
|
username: ${{ vars.DOWNLOADS_USERNAME }}
|
|
|
|
privateKey: ${{ secrets.DOWNLOADS_PRIVATE_KEY }}
|
|
|
|
host: ${{ secrets.DOWNLOADS_SERVER_IP }}
|
|
|
|
files: |
|
|
|
|
bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
|
|
|
bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
|
|
|
bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
|
|
|
bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
|
|
|
bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
|
|
|
bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
|
|
|
bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
2023-02-25 03:05:15 +01:00
|
|
|
|
2024-02-23 17:58:39 +01:00
|
|
|
- name: Publish to Modrinth (Fabric)
|
2023-03-30 17:02:12 +02:00
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
|
|
|
env:
|
2024-05-27 19:59:36 +02:00
|
|
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
2023-03-30 17:02:12 +02:00
|
|
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
2024-05-27 19:59:36 +02:00
|
|
|
run: ./gradlew fabric:modrinth
|
2024-02-23 17:58:39 +01:00
|
|
|
|
|
|
|
- name: Publish to Modrinth (NeoForge)
|
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
|
|
|
env:
|
2024-05-27 19:59:36 +02:00
|
|
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
2024-02-23 17:58:39 +01:00
|
|
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
2024-05-27 19:59:36 +02:00
|
|
|
run: ./gradlew neoforge:modrinth
|
2024-02-23 17:58:39 +01:00
|
|
|
|
2023-02-25 03:05:15 +01:00
|
|
|
- name: Notify Discord
|
2023-02-25 03:36:51 +01:00
|
|
|
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
2024-05-27 19:59:36 +02:00
|
|
|
uses: GeyserMC/actions/notify-discord@master
|
2023-02-25 03:05:15 +01:00
|
|
|
with:
|
2024-05-27 19:59:36 +02:00
|
|
|
discordWebhook: ${{ secrets.DISCORD_WEBHOOK }}
|
2024-04-20 03:47:00 +02:00
|
|
|
status: ${{ job.status }}
|
2024-05-27 19:59:36 +02:00
|
|
|
body: ${{ steps.metadata.outputs.body }}
|