Skip to content

Commit

Permalink
Removed mod publications
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAndrey committed Nov 26, 2024
1 parent c2da9b7 commit a7d9dcf
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 131 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# A deployment template that works out of the box
# It supports these objectives:
# - Deploy to Maven (Build Job) [Secrets: MAVEN_USER, MAVEN_PASS]
# - Deploy to CurseForge (Upload Job) [Secrets: CURSEFORGE_TOKEN]
# - Deploy to Modrinth (Upload Job) [Secrets: MODRINTH_TOKEN]

name: Deploy

Expand Down Expand Up @@ -43,19 +41,3 @@ jobs:
publish
-P${{ steps.properties.outputs.maven_name }}Username=${{ secrets.MAVEN_USER }}
-P${{ steps.properties.outputs.maven_name }}Password=${{ secrets.MAVEN_PASS }}
- name: Publish to CurseForge
if: steps.properties.outputs.publish_to_curseforge == 'true'
uses: gradle/gradle-build-action@v2
env:
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
with:
arguments: curseforge

- name: Publish to Modrinth
if: steps.properties.outputs.publish_to_modrinth == 'true'
uses: gradle/gradle-build-action@v2
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
with:
arguments: modrinth
17 changes: 0 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* It is advised that you do not edit anything in the build.gradle; unless you are sure of what you are doing
*/
import com.gtnewhorizons.retrofuturagradle.mcp.InjectTagsTask
import org.jetbrains.changelog.Changelog
import org.jetbrains.gradle.ext.Gradle

plugins {
Expand All @@ -11,9 +10,6 @@ plugins {
id 'maven-publish'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
id 'com.gtnewhorizons.retrofuturagradle' version '1.4.1'
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id 'com.modrinth.minotaur' version '2.+' apply false
id 'org.jetbrains.changelog' version '2.2.0'
}

apply from: 'gradle/scripts/helpers.gradle'
Expand Down Expand Up @@ -258,19 +254,6 @@ test {
}
}

String parserChangelog() {
if (!file('CHANGELOG.md').exists()) {
throw new GradleException('publish_with_changelog is true, but CHANGELOG.md does not exist in the workspace!')
}
String parsedChangelog = changelog.renderItem(
changelog.get(propertyString('mod_version')).withHeader(false).withEmptySections(false),
Changelog.OutputType.MARKDOWN)
if (parsedChangelog.isEmpty()) {
throw new GradleException('publish_with_changelog is true, but the changelog for the latest version is empty!')
}
return parsedChangelog
}

tasks.register('generateMixinJson') {
group 'cleanroom helpers'
def missingConfig = propertyStringList('mixin_configs').findAll(config -> !file("src/main/resources/mixins.${config}.json").exists())
Expand Down
20 changes: 0 additions & 20 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,6 @@ publish_to_local_maven = false
maven_name = ${mod_name}
maven_url =

# Publishing
# release_type can only be: release, beta or alpha (applies to CurseForge / Modrinth)
release_type = release
publish_with_changelog = ${{ it.file('CHANGELOG.md').exists() }}

# Publishing to CurseForge (Provide secret: CURSEFORGE_TOKEN)
# To configure dependencies, head to publishing.gradle's curseforge block
publish_to_curseforge = false
# CurseForge project ID must be the numerical ID and not the slug
curseforge_project_id =
curseforge_debug = false

# Publishing to Modrinth (Provide secret: MODRINTH_TOKEN), the token must have the `CREATE_VERSION` and `PROJECT_WRITE` permissions
# To configure dependencies, head to publishing.gradle's modrinth block
publish_to_modrinth = false
modrinth_project_id =
# Allows gradle to publish updated READMEs to the project body (via the modrinthSyncBody task)
modrinth_sync_readme = false
modrinth_debug = false

# If any properties changes below this line, refresh gradle again to ensure everything is working correctly.

# Modify Minecraft Sources
Expand Down
76 changes: 0 additions & 76 deletions gradle/scripts/publishing.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apply from: 'gradle/scripts/helpers.gradle'

setDefaultProperty('publish_to_maven', true, false)
setDefaultProperty('publish_to_curseforge', true, false)
setDefaultProperty('publish_to_modrinth', true, false)

if (propertyBool('publish_to_maven')) {
assertProperty('maven_name')
Expand Down Expand Up @@ -31,77 +29,3 @@ if (propertyBool('publish_to_maven')) {
}
}
}

// Documentation here: https://github.com/matthewprenger/CurseGradle/wiki/
if (propertyBool('publish_to_curseforge')) {
apply plugin: 'com.matthewprenger.cursegradle'
assertProperty('curseforge_project_id')
assertProperty('release_type')
setDefaultProperty('curseforge_debug', false, false)
curseforge {
apiKey = System.getenv('CURSEFORGE_TOKEN') == null ? "" : System.getenv('CURSEFORGE_TOKEN')
// noinspection GroovyAssignabilityCheck
project {
id = propertyString('curseforge_project_id')
addGameVersion 'Java 8'
addGameVersion 'Forge'
addGameVersion '1.12.2'
releaseType = propertyString('release_type')
if (!propertyBool('publish_with_changelog')) {
changelog = parserChangelog()
changelogType = 'markdown'
}
mainArtifact tasks.reobfJar, {
displayName = "${propertyString('mod_name')} ${propertyString('mod_version')}"
if (propertyBool('use_mixins')) {
relations {
requiredDependency 'mixin-booter'
}
}
if (propertyBool('use_asset_mover')) {
relations {
requiredDependency 'assetmover'
}
}
}
options {
debug = propertyBool('curseforge_debug')
}
}
}
}

// Documentation here: https://github.com/modrinth/minotaur
if (propertyBool('publish_to_modrinth')) {
apply plugin: 'com.modrinth.minotaur'
assertProperty('modrinth_project_id')
assertProperty('release_type')
setDefaultProperty('modrinth_debug', false, false)
modrinth {
token = System.getenv('MODRINTH_TOKEN') ? "" : System.getenv('MODRINTH_TOKEN')
projectId = propertyString('modrinth_project_id')
versionNumber = propertyString('mod_version')
versionType = propertyString('release_type')
uploadFile = tasks.reobfJar
gameVersions = ['1.12.2']
loaders = ['forge']
debugMode = propertyBool('modrinth_debug')
if (propertyBool('use_mixins') || propertyBool('use_asset_mover')) {
dependencies {
if (propertyBool('use_mixins')) {
required.project 'mixinbooter'
}
if (propertyBool('use_asset_mover')) {
required.project 'assetmover'
}
}
}
if (!propertyBool('publish_with_changelog')) {
changelog = parserChangelog()
}
if (propertyBool('modrinth_sync_readme')) {
syncBodyFrom = file('README.md').text
tasks.modrinth.dependsOn(tasks.modrinthSyncBody)
}
}
}

0 comments on commit a7d9dcf

Please sign in to comment.