diff --git a/.forgejo/workflows/build-release.yml b/.forgejo/workflows/build-release.yml index 56ac750..5444fdf 100644 --- a/.forgejo/workflows/build-release.yml +++ b/.forgejo/workflows/build-release.yml @@ -23,13 +23,13 @@ jobs: - name: Set git tag description id: vars2 - run: echo "tag_desc=$(git show ${{ steps.gitvar.outputs.tag }})" >> $GITHUB_OUTPUT + run: echo "tag_desc=$(git tag -l --format='%(contents)' ${{ steps.gitvar.outputs.tag }})" >> $GITHUB_OUTPUT - name: Check outputs run: echo "short ${{ steps.vars.outputs.sha_short }}, ref $GITHUB_REF, tag ${{ steps.gitvar.outputs.tag }}, tag_desc ${{ steps.vars2.outputs.tag_desc }}" - name: Tag description - run: git for-each-ref --format='%(contents)' $GITHUB_REF + run: git show -l --format='%(contents)' ${{ steps.gitvar.outputs.tag }} - uses: https://github.com/actions/setup-java@v4 name: Setup Java diff --git a/build.gradle.kts b/build.gradle.kts index 6afaacd..b193b86 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,8 +30,6 @@ plugins { id("com.modrinth.minotaur") version "2.+" } -val git_ref = System.getenv("GITHUB_REF_NAME") ?: "Not found" - val ver = if ((System.getenv("GITHUB_REF") ?: "local").startsWith("refs/tags/")) System.getenv("GITHUB_REF_NAME") ?: "err" else System.getenv("GIT_SHA_SHORT") ?: "0.0.0" @@ -39,11 +37,6 @@ val mavenVersion = ver val modId: String by project val modName: String by project -val git_tag_message_list = (System.getenv("GIT_TAG") ?: "\n\n\n\n\n\nnot\nfound").split("\n") -val git_tag_message = git_tag_message_list.subList(4, git_tag_message_list.size - 1).toString() - .replace(",", "\n") - .split("commit")[0] - /* * Gimbal version stuff * */ @@ -224,7 +217,7 @@ modrinth { uploadFile.set(tasks.remapJar) // With Loom, this MUST be set to `remapJar` instead of `jar`! gameVersions.addAll(listOf(project.ext["minecraft.version"] as String)) // Must be an array, even with only one version loaders.add("fabric") // Must also be an array - no need to specify this if you're using Loom or ForgeGradle - changelog.set(git_tag_message) + changelog.set(System.getenv("GIT_TAG") ?: "Can't find git tag") dependencies { // A special DSL for creating dependencies // scope.type // The scope can be `required`, `optional`, `incompatible`, or `embedded`