Skip to content

Commit

Permalink
Merge pull request #1150 from P3pp3rF1y/1.20.x-dev
Browse files Browse the repository at this point in the history
Release merge
  • Loading branch information
P3pp3rF1y committed Sep 22, 2024
2 parents 25965d9 + 1bb7973 commit bc582b3
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 165 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ jobs:
echo "Branch name does not match the pattern: $BRANCH_NAME. Skipping CurseForge upload."
exit 0
fi
- name: Publish to Modrinth
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
run: |
BRANCH_NAME=${GITHUB_REF##*/}
if [[ "$BRANCH_NAME" =~ ^[0-9]+\.[0-9]+\.([0-9]+|x)$ ]]; then
./gradlew modrinth
else
echo "Branch name does not match the pattern: $BRANCH_NAME. Skipping Modrinth upload."
exit 0
fi
- name: Code Quality
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
20 changes: 19 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id 'net.neoforged.gradle' version '[6.0.18,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id "net.darkhax.curseforgegradle" version "1.1.15"
id "com.modrinth.minotaur" version "2.+"
}

idea {
Expand Down Expand Up @@ -313,14 +314,31 @@ task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
"${release_versions}".split(',').each {
mainFile.addGameVersion("${it}")
}
mainFile
mainFile.addRequirement('sophisticated-core')
mainFile.addOptional('jei')
mainFile.addOptional('curios')
mainFile.addOptional('crafting-tweaks')
onlyIf { !project.ext.changelog.isEmpty() }
}

tasks.modrinth.dependsOn(tasks.generateChangelog)
tasks.modrinth.onlyIf { !project.ext.changelog.isEmpty() }
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = "${modrinth_project_id}"
versionType = "${release_type}"
uploadFile = jar
gameVersions = "${release_versions}".split(',').collect {e -> e}
loaders = ["forge", "neoforge"]
dependencies {
required.project "sophisticated-core"
optional.project "jei"
optional.project "crafting-tweaks"
optional.project "curios"
}
changelog = "${ project.ext.changelog }"
}

task printVersionName {
println "version:" + project.version
}
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ loader_version_range=[47,)
curseforge_id=422301
release_type=release
release_versions=1.20.1
modrinth_project_id=TyCTlI4b

#deps
jei_mc_version=1.20.1-forge
jei_version=15.3.0.4
jei_version=15.19.5.99
curios_version=5.7.0+1.20.1
botania_version=1.19.2-439-FORGE-SNAPSHOT
patchouli_version=1.19.2-78-SNAPSHOT
Expand Down
Loading

0 comments on commit bc582b3

Please sign in to comment.