Skip to content

Commit

Permalink
auto upload, change modid to tweakerge
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Sep 24, 2023
1 parent e9bae70 commit b32fa03
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 12 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Release

on: [workflow_dispatch] # Manual trigger

permissions:
contents: write

jobs:
Build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 20
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 20
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }}
- uses: gradle/wrapper-validation-action@v1
- run: |
chmod +x gradlew
./gradlew build publishCurseForge publish modrinth --stacktrace -Porg.gradle.parallel.threads=4
env:
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Change
- change modid to `tweakerge`
39 changes: 38 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id "dev.architectury.loom" version "1.1-SNAPSHOT"
id "dev.architectury.loom" version "1.2-SNAPSHOT"
id "maven-publish"
id 'com.modrinth.minotaur' version '2.+'
id 'net.darkhax.curseforgegradle' version '1.+'
}

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
Expand Down Expand Up @@ -63,6 +65,41 @@ jar {
}
}

modrinth {
token = System.getenv("MODRINTH_TOKEN")

projectId = "${project.modrinth_id}"
versionNumber = "${project.version}"
versionType = "beta"
changelog = file("CHANGELOG.md").getText('UTF-8')
uploadFile = remapJar
additionalFiles = [sourcesJar]
gameVersions = ["1.19", "1.19.1", "1.19.2"]
loaders = ["forge"]
dependencies {
required.project("mafglib")
}
}

task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
apiToken = System.getenv("CURSEFORGE_TOKEN")
disableVersionDetection()

def mainFile = upload(project.curseforge_id, remapJar)
mainFile.displayName = "${project.version}"
mainFile.releaseType = "beta"
mainFile.changelog = file("CHANGELOG.md")
mainFile.changelogType = "markdown"
mainFile.addModLoader("Forge")
mainFile.addJavaVersion("Java 17", "Java 18")
mainFile.addGameVersion("1.19", "1.19.1", "1.19.2")
mainFile.addRequirement("mafglib")

def sourcesFile = mainFile.withAdditionalFile(sourcesJar)
sourcesFile.changelog = file("CHANGELOG.md")
sourcesFile.changelogType = "markdown"
}

// configure the maven publication
publishing {
publications {
Expand Down
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ loom.platform=forge
yarn_mappings=1.19.2+build.1

# Mod Properties
mod_version=0.1.1
mod_version=0.1.2
maven_group=org.thinkingstudio.tweakerge
archives_base_name=Tweakerge
mod_id=tweakeroo
mod_id=tweakerge
mod_author=ThinkingStudio
modrinth_id=yke6wdGF
curseforge_id=915857

# Dependencies
malilib_version=0.1.5-mc1.19.2
malilib_version=0.1.7-mc1.19.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion src/main/java/fi/dy/masa/tweakeroo/Reference.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

public class Reference
{
public static final String MOD_ID = "tweakeroo";
public static final String MOD_ID = "tweakerge";
public static final String MOD_NAME = "Tweakerge";
public static final String MOD_VERSION = StringUtils.getModVersionString(MOD_ID);
}
12 changes: 6 additions & 6 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ loaderVersion = "[40,)"
license = "LGPLv3"

[[mods]]
modId = "tweakeroo"
modId = "tweakerge"
version = "${version}"
displayName = "Tweakerge"
displayURL="https://github.com/ThinkingStudios/Tweakeroo-Forge" #optional
Expand All @@ -16,23 +16,23 @@ Tweakeroo unofficial forge port.
Adds a bunch of configurable client-side tweaks.
'''

[[dependencies.tweakeroo]]
[[dependencies.tweakerge]]
modId = "forge"
mandatory = true
versionRange = "[40,)"
ordering = "NONE"
side = "CLIENT"

[[dependencies.tweakeroo]]
[[dependencies.tweakerge]]
modId = "minecraft"
mandatory = true
versionRange = "[1.19,)"
ordering = "NONE"
side = "CLIENT"

[[dependencies.tweakeroo]]
modId = "malilib"
[[dependencies.tweakerge]]
modId = "mafglib"
mandatory = true
versionRange = "[0.1.5,)"
versionRange = "*"
ordering = "NONE"
side = "CLIENT"

0 comments on commit b32fa03

Please sign in to comment.