From bdbca513f751c56cca93c451375205f4351ef630 Mon Sep 17 00:00:00 2001 From: Kas-tle <26531652+Kas-tle@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:55:48 -0800 Subject: [PATCH] 1.20.2 & cleanup publish action --- .github/workflows/publish.yml | 18 ++++++++++++++---- build.gradle | 3 ++- src/main/resources/fabric.mod.json | 4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7d9d5bc..31a0e0d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,13 +5,23 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: gradle/wrapper-validation-action@v1 - - uses: actions/setup-java@v3 + - uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9 + - uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 + - uses: actions/setup-java@4075bfc1b51bf22876335ae1cd589602d60d8758 with: distribution: 'temurin' java-version: 17 - name: Publish to Modrinth + uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232 env: MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} - run: ./gradlew modrinth \ No newline at end of file + with: + arguments: modrinth + gradle-home-cache-cleanup: true + - name: Archive Artifacts + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 + if: success() + with: + name: Floodgate Fabric + path: build/libs/floodgate-fabric.jar + if-no-files-found: error \ No newline at end of file diff --git a/build.gradle b/build.gradle index 02e34e8..ea7dce6 100644 --- a/build.gradle +++ b/build.gradle @@ -147,6 +147,7 @@ publishing { tasks.modrinth.dependsOn tasks.remappedModrinthJar modrinth { + token = System.getenv('MODRINTH_TOKEN') // Prevent GitHub Actions from caching empty Modrinth token projectId = "bWrNNfkb" versionNumber = project.version as String + "-" + System.getenv("GITHUB_RUN_NUMBER") versionType = "beta" @@ -155,7 +156,7 @@ modrinth { syncBodyFrom = rootProject.file("README.md").text uploadFile = tasks.getByPath("remappedModrinthJar") - gameVersions.addAll("1.20.4") + gameVersions.addAll("1.20.2", "1.20.4") loaders = ["fabric"] diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index ea27607..a80208d 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -24,8 +24,8 @@ "floodgate.mixins.json" ], "depends": { - "fabricloader": ">=0.15.2", + "fabricloader": ">=0.14.22", "fabric": "*", - "minecraft": ">=1.20.4" + "minecraft": ">=1.20.2" } } \ No newline at end of file