Skip to content

Commit

Permalink
Merge branch '1.20.x/dev' into 1.20.x/stable
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Jul 16, 2024
2 parents 15a292b + 053d85c commit 50d86fa
Show file tree
Hide file tree
Showing 24 changed files with 301 additions and 276 deletions.
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: flashyreese
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
build:
if: github.repository_owner == 'FlashyReese'
runs-on: self-hosted
steps:
- name: Checkout Repository
Expand All @@ -20,11 +21,10 @@ jobs:
java-version: 21
check-latest: true
- name: Upload assets to releases
run: ./gradlew build publishAllPublicationsToFlashyReeseReleasesRepository
run: ./gradlew build publishAllPublicationsToFlashyReeseReleasesRepository -Pbuild.release
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
BUILD_RELEASE: ${{ github.event.prerelease == false }}
- name: Publish to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.3
with:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [ push ]

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

steps:
Expand All @@ -17,8 +18,11 @@ jobs:
distribution: 'temurin'
java-version: 21
check-latest: true
- name: Build with Gradle
run: ./gradlew build
- name: Build and Publish with Gradle
run: ./gradlew build publishAllPublicationsToFlashyReeseSnapshotsRepository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload Auild Artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
![Mod loader: Fabric](https://img.shields.io/badge/modloader-Fabric-1976d2?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cD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SIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4/HiGMAAAAtUlEQVRYw+XXrQqAMBQF4D2P2eBL+QIG8RnEJFaNBjEum+0+zMQLtwwv+wV3ZzhhMDgfJ0wUSinxZUQWgKos1JP/AbD4OneIDyQPwCFniA+EJ4CaXm4TxAXCC0BNHgLhAdAnx9hC8PwGSRtAFVMQjF7cNTWED8B1cgwW20yfJgAvrssAsZ1cB3g/xckAxr6FmCDU5N6f488BrpCQ4rQBJkiMYh4ACmLzwOQF0CExinkCsvw7vgGikl+OotaKRwAAAABJRU5ErkJggg==)
![Version](https://img.shields.io/github/v/tag/FlashyReese/reeses-sodium-options?label=version&style=flat-square)
[![CurseForge](http://cf.way2muchnoise.eu/title/511319.svg)](https://www.curseforge.com/minecraft/mc-mods/reeses-sodium-options)
[![Support Server](https://img.shields.io/discord/748363294749753484.svg?color=7289da&label=FlashyReese&logo=discord&style=flat-square)](https://discord.gg/MPHVG6MH4e)
[![Support Server](https://img.shields.io/discord/748363294749753484.svg?color=7289da&label=FlashyReese&logo=discord&style=flat-square)](https://flashyreese.me/discord)

Reese's Edition of Sodium Options

Expand Down
48 changes: 20 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
plugins {
id 'org.ajoberstar.grgit' version '5.2.1'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
id 'signing'
Expand All @@ -9,7 +8,7 @@ sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

archivesBaseName = project.archives_base_name
version = "${project.mod_version}${getVersionType(project.version_type, project.revision)}+mc${project.minecraft_version}-${getVersionMetadata()}"
version = createVersionString()
group = project.maven_group

repositories {
Expand All @@ -31,11 +30,11 @@ repositories {
dependencies {
//to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

//modImplementation "me.jellysquid.mods:sodium:0.5.8-snapshot+mc1.20.5-build.6"
//modImplementation "me.jellysquid.mods:sodium:0.5.9-snapshot+mc1.21-pre3-build.9"
modImplementation "maven.modrinth:sodium:${project.sodium_version}"
//modImplementation "maven.modrinth:iris:${project.iris_version}"
}
Expand Down Expand Up @@ -94,35 +93,28 @@ publishing {
}
}

def getVersionMetadata() {
def build_id = System.getenv("GITHUB_RUN_NUMBER")
def createVersionString() {
def builder = new StringBuilder()

// CI builds only
if (build_id != null) {
return "build.${build_id}"
def isReleaseBuild = project.hasProperty("build.release")
def buildId = System.getenv("GITHUB_RUN_NUMBER")

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

if (grgit != null) {
def head = grgit.head()
def id = head.abbreviatedId
builder.append("+mc").append(minecraft_version)

// Flag the build if the build tree is not clean
if (!grgit.status().clean) {
id += "-dirty"
if (!isReleaseBuild) {
if (buildId != null) {
builder.append("-build.${buildId}")
} else {
builder.append("-local")
}

return "rev.${id}"
}

// No tracking information could be found about the build
return "unknown"
}

static def getVersionType(String version_type, String revision) {
version_type = version_type.trim().toLowerCase()
revision = revision.trim().toLowerCase()
if (version_type != "release") {
return "-${version_type}${revision}"
}
return ""
return builder.toString()
}
14 changes: 6 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
loader_version=0.15.10
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.3
loader_version=0.15.11
# Mod Properties
version_type=release
revision=1
mod_version=1.7.2
mod_version=1.7.3
maven_group=me.flashyreese.mods
archives_base_name=reeses_sodium_options

# Dependency
sodium_version=mc1.20.5-0.5.8
sodium_version=mc1.20.6-0.5.11
iris_version=1.20.4-1.6.15

#Fabric api
fabric_version=0.97.5+1.20.5
fabric_version=0.100.4+1.20.6
Loading

0 comments on commit 50d86fa

Please sign in to comment.