Skip to content

Commit

Permalink
Merge branch 'master' into 1.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
DrexHD committed Jan 22, 2024
2 parents 71ebce3 + 9db1dcb commit 522fc9a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 25 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,25 @@ jobs:
with:
java-version: 17

- name: Release versions
env:
CURSEFORGE_TOKEN: ${{ secrets.CF_API_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CHANGELOG: ${{ github.event.body }}
run: ./gradlew release

- name: Upload GitHub release
uses: AButler/upload-release-assets@v2.0
- name: Build release
run: ./gradlew build

- name: Upload assets to GitHub, Modrinth and CurseForge
uses: Kir-Antipov/mc-publish@v3.2
with:
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev-all.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}
modrinth-id: LVN9ygNV
modrinth-featured: false
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

curseforge-id: 491137
curseforge-token: ${{ secrets.CF_API_TOKEN }}

github-token: ${{ secrets.GITHUB_TOKEN }}

loaders: |
fabric
quilt
files: |
build/libs/!(*-@(dev-all|sources|javadoc)).jar
build/libs/*-@(dev-all|sources|javadocs).jar
19 changes: 7 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import com.modrinth.minotaur.TaskModrinthUpload

plugins {
kotlin("jvm") version "1.7.10"
id("fabric-loom") version "1.4.+"
id("maven-publish")
id("io.gitlab.arturbosch.detekt") version "1.19.0"
id("com.github.jakemarsden.git-hooks") version "0.0.2"
id("com.modrinth.minotaur") version "2.+"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.matthewprenger.cursegradle") version "1.4.0"
}

var release = false
val props = properties

val modId: String by project
Expand Down Expand Up @@ -107,6 +102,7 @@ tasks {
"name" to modName,
"fabricApi" to libs.versions.fabric.api.get(),
"fabricKotlin" to libs.versions.fabric.kotlin.get(),
"minecraft" to libs.versions.minecraft.get(),
)
)
}
Expand Down Expand Up @@ -178,10 +174,6 @@ tasks {
jvmTarget = javaVersion.toString()
}
}

withType<TaskModrinthUpload> {
onlyIf { System.getenv().contains("MODRINTH_TOKEN") }
}
}

// configure the maven publication
Expand Down Expand Up @@ -211,15 +203,18 @@ gitHooks {
}

fun getVersionMetadata(): String {
if (release) return ""

val buildId = System.getenv("GITHUB_RUN_NUMBER")
val workflow = System.getenv("GITHUB_WORKFLOW")

if (workflow == "Release") {
return ""
}

// CI builds only
if (buildId != null) {
return "+build.$buildId"
}

// No tracking information could be found about the build
return ""
return "+local"
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kotlin.code.style=official
org.gradle.jvmargs=-Xmx1G

# Mod Properties
modVersion = 1.2.9
modVersion = 1.2.10
mavenGroup = com.github.quiltservertools
modId = ledger
modName = Ledger
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"fabricloader": ">=0.15.0",
"fabric": ">=${fabricApi}",
"fabric-language-kotlin": ">=${fabricKotlin}",
"minecraft": ">=1.20.2"
"minecraft": ">=${minecraft}"
},
"breaks": {
"cardboard": "*"
Expand Down

0 comments on commit 522fc9a

Please sign in to comment.