Skip to content

Commit

Permalink
Set up CF and Modrinth publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Su5eD committed Jul 16, 2023
1 parent 0caf2a5 commit 099b4f9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Create placeholder assets dir
run: mkdir -p ${{ env.GRADLE_USER_HOME }}/caches/fabric-loom/assets
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew checkVersion build publish github --stacktrace
- run: ./gradlew checkVersion build publish curseforge github modrinth --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand Down
29 changes: 17 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -593,28 +593,31 @@ def addPomMetadataInformation(Project project, MavenPom pom) {

def modJson = new JsonSlurper().parse(modJsonFile)
pom.name = modJson.name
pom.url = "https://github.com/FabricMC/fabric/tree/HEAD/${project.rootDir.relativePath(project.projectDir)}"
pom.url = "https://github.com/Sinytra/ForgifiedFabricAPI/tree/HEAD/${project.rootDir.relativePath(project.projectDir)}"
pom.description = modJson.description
pom.licenses {
license {
name = "Apache-2.0"
url = "https://github.com/FabricMC/fabric/blob/HEAD/LICENSE"
url = "https://github.com/Sinytra/ForgifiedFabricAPI/blob/HEAD/LICENSE"
}
}
pom.developers {
developer {
name = "FabricMC"
url = "https://fabricmc.net/"
}
developer {
name = "Sinytra"
}
}
pom.scm {
connection = "scm:git:https://github.com/FabricMC/fabric.git"
url = "https://github.com/FabricMC/fabric"
developerConnection = "scm:git:[email protected]:FabricMC/fabric.git"
connection = "scm:git:https://github.com/Sinytra/ForgifiedFabricAPI.git"
url = "https://github.com/Sinytra/ForgifiedFabricAPI"
developerConnection = "scm:git:[email protected]:Sinytra/ForgifiedFabricAPI.git"
}
pom.issueManagement {
system = "GitHub"
url = "https://github.com/FabricMC/fabric/issues"
url = "https://github.com/Sinytra/ForgifiedFabricAPI/issues"
}
}

Expand Down Expand Up @@ -766,14 +769,14 @@ curseforge {
}

project {
id = "306612"
id = "889079"
changelog = ENV.CHANGELOG ?: "No changelog provided"
releaseType = project.prerelease == "true" ? "beta" : "release"
addGameVersion "1.20.1"
addGameVersion "Fabric"
addGameVersion "Forge"

mainArtifact(signingEnabled ? signRemapJar.output : remapJar) {
displayName = "[$project.minecraft_version] Fabric API $project.version"
displayName = "[$project.minecraft_version] Forgified Fabric API $project.version"
}

afterEvaluate {
Expand Down Expand Up @@ -808,7 +811,7 @@ tasks.register('github') {
def repository = github.getRepository(ENV.GITHUB_REPOSITORY)

def releaseBuilder = new GHReleaseBuilder(repository, version as String)
releaseBuilder.name("[$project.minecraft_version] Fabric API $project.version")
releaseBuilder.name("[$project.minecraft_version] Forgified Fabric API $project.version")
releaseBuilder.body(ENV.CHANGELOG ?: "No changelog provided")
releaseBuilder.commitish(getBranch())
releaseBuilder.prerelease(project.prerelease == "true")
Expand All @@ -819,10 +822,12 @@ tasks.register('github') {
}

modrinth {
projectId = "fabric-api"
versionName = "[$project.minecraft_version] Fabric API $project.version"
projectId = "forgified-fabric-api"
versionName = "[$project.minecraft_version] Forgified Fabric API $project.version"
versionType = project.prerelease == "true" ? "beta" : "release"
changelog = ENV.CHANGELOG ?: "No changelog provided"
loaders = ["forge"]
gameVersions = ["1.20.1"]

uploadFile = signingEnabled ? signRemapJar.output : remapJar
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ fabric-client-tags-api-v1-version=1.1.0
loom.platform=forge
forge_version=1.20.1-47.1.8
pack_format=15
forgified_version=1.4.0
forgified_version=1.4.1

0 comments on commit 099b4f9

Please sign in to comment.