From 90bb7e42ab025c291b0e98d15d8b42135f032073 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:25:11 -0400 Subject: [PATCH] Publish to Modrinth --- .github/workflows/publish.yml | 17 +++++++++++++++++ build.gradle | 19 +++++++++++++++++++ 2 files changed, 36 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 00000000..7d9d5bc7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,17 @@ +name: Publish +on: push + +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: Publish to Modrinth + env: + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + run: ./gradlew modrinth \ No newline at end of file diff --git a/build.gradle b/build.gradle index bf9e8185..74045806 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,7 @@ plugins { id 'fabric-loom' version '1.0-SNAPSHOT' id 'java' id 'maven-publish' + id "com.modrinth.minotaur" version "2.+" } sourceCompatibility = JavaVersion.VERSION_17 @@ -147,4 +148,22 @@ publishing { repositories { mavenLocal() } +} + +modrinth { + projectId = "wKkoqHrH" + versionNumber = project.version as String + "-" + System.getenv("GITHUB_RUN_NUMBER") + versionType = "beta" + changelog = "A changelog can be found at https://github.com/GeyserMC/Floodgate-Fabric/commits" + + syncBodyFrom = rootProject.file("README.md").text + + uploadFile = tasks.getByPath("remappedShadowJar") + gameVersions = ["1.19.4"] + + loaders = ["fabric"] + + dependencies { + required.project "fabric-api" + } } \ No newline at end of file