2023-02-25 02:05:15 +00:00
|
|
|
name: Build
|
|
|
|
|
2023-03-08 02:59:21 +00:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
2024-03-09 01:24:16 +00:00
|
|
|
branches-ignore:
|
|
|
|
- 'gh-readonly-queue/**'
|
2023-03-08 02:59:21 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '.github/ISSUE_TEMPLATE/*.yml'
|
2024-04-21 02:07:39 +00:00
|
|
|
- '.github/workflows/build-remote.yml'
|
|
|
|
- '.github/workflows/preview.yml'
|
|
|
|
- '.github/workflows/pull-request.yml'
|
2024-03-04 22:37:45 +00:00
|
|
|
- '.idea/copyright/*.xml'
|
2023-03-08 02:59:21 +00:00
|
|
|
- '.gitignore'
|
|
|
|
- 'CONTRIBUTING.md'
|
|
|
|
- 'LICENSE'
|
|
|
|
- 'Jenkinsfile '
|
|
|
|
- 'README.md'
|
|
|
|
- 'licenseheader.txt'
|
2023-02-25 02:05:15 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-05-27 17:59:36 +00:00
|
|
|
- name: Get Release Info
|
|
|
|
id: release-info
|
|
|
|
uses: GeyserMC/actions/previous-release@master
|
|
|
|
with:
|
|
|
|
data: ${{ vars.RELEASEACTION_PREVRELEASE }}
|
2024-04-20 01:47:00 +00:00
|
|
|
|
2024-05-27 17:59:36 +00:00
|
|
|
- name: Setup Gradle
|
2024-05-28 07:11:05 +00:00
|
|
|
uses: GeyserMC/actions/setup-gradle-composite@master
|
2023-02-25 02:05:15 +00:00
|
|
|
with:
|
2024-05-28 07:11:05 +00:00
|
|
|
setup-java_java-version: 21
|
2024-05-27 17:59:36 +00:00
|
|
|
|
|
|
|
- name: Build Geyser
|
|
|
|
run: ./gradlew build
|
|
|
|
env:
|
|
|
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
2023-03-08 02:59:21 +00:00
|
|
|
|
2024-05-28 07:11:05 +00:00
|
|
|
- name: Archive Artifacts
|
|
|
|
uses: GeyserMC/actions/upload-multi-artifact@master
|
2023-03-08 02:59:21 +00:00
|
|
|
if: success()
|
|
|
|
with:
|
2024-05-28 07:11:05 +00: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 02:05:15 +00:00
|
|
|
|
|
|
|
- name: Publish to Maven Repository
|
2023-03-30 15:02:12 +00:00
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
2024-05-27 17:59:36 +00:00
|
|
|
run: ./gradlew publish
|
2023-02-25 02:05:15 +00:00
|
|
|
env:
|
2024-05-27 17:59:36 +00:00
|
|
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
2023-02-25 02:05:15 +00:00
|
|
|
ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
|
|
|
|
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
|
2024-05-27 17:59:36 +00:00
|
|
|
|
|
|
|
- name: Get Version
|
2024-05-28 07:11:05 +00:00
|
|
|
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
2024-05-27 17:59:36 +00: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 02:05:15 +00:00
|
|
|
|
2024-04-18 14:29:40 +00:00
|
|
|
- name: Get Release Metadata
|
2024-05-28 07:11:05 +00:00
|
|
|
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
2024-05-27 17:59:36 +00:00
|
|
|
uses: GeyserMC/actions/release@master
|
|
|
|
id: metadata
|
2024-04-18 14:29:40 +00: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 17:59:36 +00:00
|
|
|
releaseProject: 'geyser'
|
|
|
|
releaseVersion: ${{ steps.get-version.outputs.VERSION }}
|
2024-05-28 07:11:05 +00:00
|
|
|
|
2023-02-25 02:05:15 +00:00
|
|
|
- name: Publish to Downloads API
|
2023-03-30 15:02:12 +00:00
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
2024-05-27 17:59:36 +00: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 07:11:05 +00:00
|
|
|
changelog: ${{ steps.metadata.outputs.body }}
|
2023-02-25 02:05:15 +00:00
|
|
|
|
2024-06-17 19:31:54 +00:00
|
|
|
- name: Publish to Modrinth
|
2023-03-30 15:02:12 +00:00
|
|
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
|
|
|
env:
|
2024-06-19 20:27:14 +00:00
|
|
|
CHANGELOG: ${{ steps.metadata.outputs.body }}
|
2024-05-27 17:59:36 +00:00
|
|
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
2023-03-30 15:02:12 +00:00
|
|
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
2024-06-17 19:31:54 +00:00
|
|
|
run: ./gradlew modrinth
|
2024-02-23 16:58:39 +00:00
|
|
|
|
2023-02-25 02:05:15 +00:00
|
|
|
- name: Notify Discord
|
2023-02-25 02:36:51 +00:00
|
|
|
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
2024-05-27 17:59:36 +00:00
|
|
|
uses: GeyserMC/actions/notify-discord@master
|
2023-02-25 02:05:15 +00:00
|
|
|
with:
|
2024-05-27 17:59:36 +00:00
|
|
|
discordWebhook: ${{ secrets.DISCORD_WEBHOOK }}
|
2024-04-20 01:47:00 +00:00
|
|
|
status: ${{ job.status }}
|
2024-05-27 17:59:36 +00:00
|
|
|
body: ${{ steps.metadata.outputs.body }}
|
2024-05-29 08:48:33 +00:00
|
|
|
includeDownloads: ${{ github.ref_name == 'master' }}
|