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
|
|
|
|
2024-05-27 19:59:36 +02:00
|
|
|
- name: Setup Gradle
|
2024-05-28 09:11:05 +02:00
|
|
|
uses: GeyserMC/actions/setup-gradle-composite@master
|
2023-02-25 03:05:15 +01:00
|
|
|
with:
|
2024-05-28 09:11:05 +02:00
|
|
|
setup-java_java-version: 21
|
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
|
|
|
|
2024-05-28 09:11:05 +02:00
|
|
|
- name: Archive Artifacts
|
|
|
|
uses: GeyserMC/actions/upload-multi-artifact@master
|
2023-03-08 03:59:21 +01:00
|
|
|
if: success()
|
|
|
|
with:
|
2024-05-28 09:11:05 +02:00
|
|
|
artifacts: |
|
|
|
|
bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
|
|
|
bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
|
|
|
bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
|
|
|
bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
|
|
|
bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
|
|
|
bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
|
|
|
bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
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
|
2024-05-28 09:11:05 +02:00
|
|
|
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
2024-05-27 19:59:36 +02:00
|
|
|
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
|
2024-05-28 09:11:05 +02:00
|
|
|
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
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 }}
|
2024-05-28 09:11:05 +02:00
|
|
|
|
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
|
2024-05-28 09:11:05 +02:00
|
|
|
changelog: ${{ steps.metadata.outputs.body }}
|
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 }}
|
2024-05-29 10:48:33 +02:00
|
|
|
includeDownloads: ${{ github.ref_name == 'master' }}
|