From 0e899f64a36fa294d1cf82e912378c6eb37965ba Mon Sep 17 00:00:00 2001 From: PinkGoosik Date: Mon, 8 Jul 2024 23:13:04 +0500 Subject: [PATCH] fix forgix --- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 10 +++++----- build.gradle.kts | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c023a46..71db25c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: with: name: Artifacts path: | - Merged/${{ steps.props.outputs.mod_id }}-${{ steps.props.outputs.mod_version }}.jar + build/libs/merged/${{ steps.props.outputs.mod_id }}-${{ steps.props.outputs.mod_version }}.jar ${{ steps.props.outputs.mod_id }}-fabric/build/libs/${{ steps.props.outputs.mod_id }}-fabric-${{ steps.props.outputs.mod_version }}.jar ${{ steps.props.outputs.mod_id }}-fabric/build/libs/${{ steps.props.outputs.mod_id }}-fabric-${{ steps.props.outputs.mod_version }}-sources.jar ${{ steps.props.outputs.mod_id }}-neoforge/build/libs/${{ steps.props.outputs.mod_id }}-neoforge-${{ steps.props.outputs.mod_version }}.jar diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fb10d2e..44f5358 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,8 +42,8 @@ jobs: curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} files: | - Merged/${{ steps.props.outputs.mod_id }}-${{ github.event.release.tag_name }}.jar - + build/libs/merged/${{ steps.props.outputs.mod_id }}-${{ github.event.release.tag_name }}.jar + name: ${{ github.event.release.tag_name }} version: ${{ github.event.release.tag_name }} @@ -54,7 +54,7 @@ jobs: game-versions: ${{ steps.props.outputs.minecraft_version_range_fabric }} game-version-filter: releases - + dependencies: | cloth-config @@ -63,9 +63,9 @@ jobs: retry-attempts: 0 fail-mode: skip - + - name: Upload assets to GitHub uses: AButler/upload-release-assets@v3.0 with: - files: "Merged/${{ steps.props.outputs.mod_id }}-${{ github.event.release.tag_name }}.jar;${{ steps.props.outputs.mod_id }}-fabric/build/libs/${{ steps.props.outputs.mod_id }}-fabric-${{ github.event.release.tag_name }}.jar;${{ steps.props.outputs.mod_id }}-fabric/build/libs/${{ steps.props.outputs.mod_id }}-fabric-${{ github.event.release.tag_name }}-sources.jar;${{ steps.props.outputs.mod_id }}-neoforge/build/libs/${{ steps.props.outputs.mod_id }}-neoforge-${{ github.event.release.tag_name }}.jar;${{ steps.props.outputs.mod_id }}-neoforge/build/libs/${{ steps.props.outputs.mod_id }}-neoforge-${{ github.event.release.tag_name }}-sources.jar" + files: "build/libs/merged/${{ steps.props.outputs.mod_id }}-${{ github.event.release.tag_name }}.jar;${{ steps.props.outputs.mod_id }}-fabric/build/libs/${{ steps.props.outputs.mod_id }}-fabric-${{ github.event.release.tag_name }}.jar;${{ steps.props.outputs.mod_id }}-fabric/build/libs/${{ steps.props.outputs.mod_id }}-fabric-${{ github.event.release.tag_name }}-sources.jar;${{ steps.props.outputs.mod_id }}-neoforge/build/libs/${{ steps.props.outputs.mod_id }}-neoforge-${{ github.event.release.tag_name }}.jar;${{ steps.props.outputs.mod_id }}-neoforge/build/libs/${{ steps.props.outputs.mod_id }}-neoforge-${{ github.event.release.tag_name }}-sources.jar" repo-token: ${{ secrets.GH_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index 69867a8..e7898e0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import groovy.lang.Closure +import io.github.pacifistmc.forgix.plugin.ForgixMergeExtension import net.fabricmc.loom.api.LoomGradleExtensionAPI plugins { @@ -11,9 +13,22 @@ architectury { minecraft = rootProject.property("minecraft_version").toString() } +@Suppress("UNCHECKED_CAST") forgix { group = "ru.pinkgoosik.winterly" mergedJarName = "winterly-${rootProject.property("mod_version").toString()}.jar" + outputDir = "build/libs/merged" + + fabric( + closureOf { + projectName = "winterly-fabric" + } as Closure + ) + neoforge( + closureOf { + projectName = "winterly-neoforge" + } as Closure + ) } subprojects {