Skip to content

Commit

Permalink
Add publishing plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Provismet committed Sep 15, 2024
1 parent f931c24 commit 4adb756
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 4 deletions.
45 changes: 44 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'fabric-loom' version '1.4-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
id "me.modmuss50.mod-publish-plugin" version "0.6.3"
}

version = project.mod_version + "+" + project.minecraft_version
Expand Down Expand Up @@ -62,10 +63,52 @@ jar {
}
}

publishMods {
file = remapJar.archiveFile
additionalFiles.from(remapSourcesJar.archiveFile)
changelog = file("changelog.md").text
type = STABLE
modLoaders.add("fabric")
modLoaders.add("quilt")
displayName = project.version.toString()
dryRun = providers.environmentVariable("GITHUB_TOKEN").getOrNull() == null || providers.environmentVariable("MODRINTH_TOKEN").getOrNull() == null || providers.environmentVariable("CURSEFORGE_TOKEN").getOrNull() == null

github {
repository = "Provismet/${project.github_repo}"
accessToken = providers.environmentVariable("GITHUB_TOKEN")
commitish = "${project.github_branch}"
tagName = "${project.mod_version}-mc${project.minecraft_version}"
allowEmptyFiles = true
displayName = "${project.mod_version} - ${project.minecraft_version}"
}

modrinth {
projectId = project.modrinth_id
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
minecraftVersionRange {
start = project.version_start
end = project.version_end
}
requires("fabric-api")
}

curseforge {
projectId = project.curseforge_id
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
clientRequired = true
minecraftVersionRange {
start = project.version_start
end = project.version_end
}
requires("fabric-api")
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
version = project.mod_version + "-mc" + project.minecraft_version
from components.java
}
}
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Minor patch to enable a fix for a niche compatibility issue in Dual Swords.

## Additions
- Melee weapons now have a stack-aware version of `getWeaponDamage`.
- Dual weapons now have a stack-aware version of `getOffhandDamage`.
14 changes: 11 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ yarn_mappings=1.20.1+build.10
loader_version=0.15.2

# Mod Properties
mod_version=1.0.0
maven_group=com.provismet
mod_version=1.1.0
maven_group=com.github.Provismet
archives_base_name=combatplus-core

# Dependencies
fabric_version=0.91.0+1.20.1
fabric_asm_version=v2.3
lilylib_version=1.1.3-mc1.20
lilylib_version=1.1.3-mc1.20

# Publishing
github_repo = CombatPlus-Core
github_branch = 1.20
modrinth_id = NbKFMiE7
curseforge_id = 973671
version_start = 1.20
version_end = 1.20.2

0 comments on commit 4adb756

Please sign in to comment.