ci: updated release publish

Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
moonleay 2024-05-10 13:55:17 +02:00
parent f38b660e80
commit 86e92bd09f
Signed by: moonleay
GPG key ID: 82667543CCD715FB
2 changed files with 3 additions and 10 deletions

View file

@ -23,13 +23,13 @@ jobs:
- name: Set git tag description - name: Set git tag description
id: vars2 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 - 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 }}" 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 - 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 - uses: https://github.com/actions/setup-java@v4
name: Setup Java name: Setup Java

View file

@ -30,8 +30,6 @@ plugins {
id("com.modrinth.minotaur") version "2.+" 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/")) 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" 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 modId: String by project
val modName: 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 * Gimbal version stuff
* */ * */
@ -224,7 +217,7 @@ modrinth {
uploadFile.set(tasks.remapJar) // With Loom, this MUST be set to `remapJar` instead of `jar`! 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 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 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 dependencies { // A special DSL for creating dependencies
// scope.type // scope.type
// The scope can be `required`, `optional`, `incompatible`, or `embedded` // The scope can be `required`, `optional`, `incompatible`, or `embedded`