Skip to content

Commit

Permalink
Merge branch '1.21/dev' into 1.21/stable
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Aug 24, 2024
2 parents cc93eeb + 7f9c5fd commit 7824945
Show file tree
Hide file tree
Showing 56 changed files with 722 additions and 406 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Java CI with Gradle

on: [ pull_request, push ]
on: [pull_request, push]

jobs:
build:
Expand All @@ -19,8 +19,13 @@ jobs:
check-latest: true
- name: Build with Gradle
run: ./gradlew build
- name: Upload Build Artifacts
- name: Upload Build Artifacts - Fabric
uses: actions/upload-artifact@v4
with:
name: 'RSO Artifacts'
path: build/libs
name: 'RSO Fabric Artifacts'
path: fabric/build/libs
- name: Upload Build Artifacts - NeoForge
uses: actions/upload-artifact@v4
with:
name: 'RSO NeoForge Artifacts'
path: neoforge/build/libs
45 changes: 38 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Publish to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.3
- name: Publish Fabric to Modrinth, CurseForge & GitHub
uses: Kir-Antipov/mc-publish@v3.3.0
with:
modrinth-id: Bh37bMuy
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
Expand All @@ -36,13 +36,44 @@ jobs:

github-token: ${{ secrets.GITHUB_TOKEN }}

name: '[Fabric] ${{ github.event.release.name }}'
version: '${{ github.event.release.tag_name }}+fabric'
version-type: release

loaders: fabric

version-resolver: latest
dependencies: |
sodium | depends | *
sodium-extra | recommends | *
irisshaders | recommends | *
iris | recommends | *
sodium
reeses-sodium-options(optional)
irisshaders(optional)
iris(optional)
files: |
fabric/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
fabric/build/libs/*-@(dev|sources|javadoc|dev-shadow).jar
- name: Publish NeoForge to Modrinth, CurseForge & GitHub
uses: Kir-Antipov/mc-publish@v3.3.0
with:
modrinth-id: Bh37bMuy
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

curseforge-id: 511319
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

github-token: ${{ secrets.GITHUB_TOKEN }}

name: '[NeoForge] ${{ github.event.release.name }}'
version: '${{ github.event.release.tag_name }}+neoforge'
version-type: release

loaders: neoforge

dependencies: |
sodium
reeses-sodium-options(optional)
irisshaders(optional)
iris(optional)
files: |
neoforge/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
neoforge/build/libs/*-@(dev|sources|javadoc|dev-shadow).jar
15 changes: 10 additions & 5 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Self-Hosted runner CI with Gradle

on: [ push ]
on: [push]

jobs:
build:
selfhost-build:
if: github.repository_owner == 'FlashyReese'
runs-on: self-hosted

Expand All @@ -23,8 +23,13 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload Auild Artifacts
- name: Upload Build Artifacts - Fabric
uses: actions/upload-artifact@v4
with:
name: 'RSO Artifacts'
path: build/libs
name: 'RSO Fabric Artifacts'
path: fabric/build/libs
- name: Upload Build Artifacts - NeoForge
uses: actions/upload-artifact@v4
with:
name: 'RSO NeoForge Artifacts'
path: neoforge/build/libs
120 changes: 0 additions & 120 deletions build.gradle

This file was deleted.

89 changes: 89 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
plugins {
id("java")
id("fabric-loom") version ("1.7.2") apply (false)
}

val MINECRAFT_VERSION by extra { "1.21.1" }
val NEOFORGE_VERSION by extra { "21.1.23" }
val FABRIC_LOADER_VERSION by extra { "0.16.2" }
val FABRIC_API_VERSION by extra { "0.102.1+1.21.1" }

// This value can be set to null to disable Parchment.
val PARCHMENT_VERSION by extra { null }

// https://semver.org/
val MOD_VERSION by extra { "1.8.0-beta.1" }

//
val maven_group: String by project
val archives_name: String by project

allprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
group = maven_group
version = createVersionString()
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}

subprojects {
apply(plugin = "maven-publish")

repositories {
maven("https://maven.parchmentmc.org/")
maven("https://api.modrinth.com/maven")
}

base {
archivesName = "$archives_name-${project.name}"
}

java.toolchain.languageVersion = JavaLanguageVersion.of(21)

tasks.processResources {
filesMatching("META-INF/neoforge.mods.toml") {
expand(mapOf("version" to createVersionString()))
}
}

version = createVersionString()
group = "me.flashyreese.mods"

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
}

tasks.withType<GenerateModuleMetadata>().configureEach {
enabled = false
}
}

fun createVersionString(): String {
val builder = StringBuilder()

val isReleaseBuild = project.hasProperty("build.release")
val buildId = System.getenv("GITHUB_RUN_NUMBER")

if (isReleaseBuild) {
builder.append(MOD_VERSION)
} else {
builder.append(MOD_VERSION.split('-')[0])
builder.append("-snapshot")
}

builder.append("+mc").append(MINECRAFT_VERSION)

if (!isReleaseBuild) {
if (buildId != null) {
builder.append("-build.$buildId")
} else {
builder.append("-local")
}
}

return builder.toString()
}
Loading

0 comments on commit 7824945

Please sign in to comment.