Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed May 4, 2024
1 parent ef816ed commit b85f15d
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand All @@ -26,7 +26,7 @@ jobs:
chmod +x gradlew
./gradlew build
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Artifacts-forge
path: ${{ github.workspace }}/build/libs
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Release

on:
workflow_dispatch:
release:
types:
- published

permissions:
contents: write

jobs:
Build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 20
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 20
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }}
- uses: gradle/actions/wrapper-validation@v3
- run: |
chmod +x gradlew
./gradlew build publishMod --stacktrace -Porg.gradle.parallel.threads=4
env:
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
22 changes: 21 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "dev.architectury.loom" version "1.5-SNAPSHOT"
id "maven-publish"
id "com.hypherionmc.modutils.modpublisher" version "2.+"
}

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
Expand Down Expand Up @@ -75,4 +76,23 @@ publishing {
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
}

publisher {
apiKeys {
modrinth System.getenv("MODRINTH_TOKEN")
curseforge System.getenv("CURSEFORGE_TOKEN")
}

setCurseID("${project.curseforge_id}")
setModrinthID("${project.modrinth_id}")
setVersionType("alpha")
//setChangelog(file("CHANGELOG.md").getText("UTF-8"))
setVersion("${project.version}")
setDisplayName("${project.version}")
setGameVersions("1.20.3", "1.20.4")
setLoaders("neoforge")
setCurseEnvironment("client")
setArtifact(remapJar)
addAdditionalFile(sourcesJar)
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ mod_version=0.1.0
maven_group=fi.dy.masa
archives_base_name=servuxforged
mod_id=servux
mod_author=ThinkingStudio
mod_author=ThinkingStudio

modrinth_id=H9LzoDgA
curseforge_id=1013154
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pluginManagement {
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.architectury.dev/" }
maven { url "https://maven.neoforged.net/releases/" }
maven { url "https://maven.firstdark.dev/releases" }
gradlePluginPortal()
}
}
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Server-side support and integration for masa's client mods.
[[dependencies.servux]]
modId = "neoforge"
mandatory = true
versionRange = "[20.3,)"
versionRange = "[20,)"
ordering = "NONE"
side = "SERVER"

[[dependencies.servux]]
modId = "minecraft"
mandatory = true
versionRange = "[1.20.3,)"
versionRange = "[1.20.2,)"
ordering = "NONE"
side = "SERVER"

0 comments on commit b85f15d

Please sign in to comment.