From 05829eeed8daadd8e779ad50f3d89879f196f81a Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Mon, 20 Mar 2023 13:04:53 -0400 Subject: [PATCH] Upload Fabric platform to Modrinth --- .github/workflows/publish.yml | 16 ++++++++++++++++ bootstrap/fabric/build.gradle.kts | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..2b5bea7df --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,16 @@ +name: publish + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: build and publish + env: + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + run: ./gradlew fabric:modrinth \ No newline at end of file diff --git a/bootstrap/fabric/build.gradle.kts b/bootstrap/fabric/build.gradle.kts index 743b75a26..890f5d656 100644 --- a/bootstrap/fabric/build.gradle.kts +++ b/bootstrap/fabric/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("fabric-loom") version "1.0-SNAPSHOT" + id("com.modrinth.minotaur") version "2.+" } java { @@ -74,4 +75,22 @@ tasks { archiveClassifier.set("") archiveVersion.set("") } +} + +modrinth { + projectId.set("wKkoqHrH") + versionNumber.set(project.version as String + "-" + System.getenv("GITHUB_RUN_NUMBER")) + versionType.set("beta") + changelog.set("A changelog can be found at https://github.com/GeyserMC/Geyser/commits") + + syncBodyFrom.set(rootProject.file("README.md").readText()) + + uploadFile.set(tasks.getByPath("remapJar")) + gameVersions.addAll("1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4") + + loaders.add("fabric") + + dependencies { + required.project("fabric-api") + } } \ No newline at end of file