Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

Commit 1a3d625

Browse files
Merge pull request #6 from OffsetMods538/multi-version
v3?
2 parents 73ba6d2 + cddc211 commit 1a3d625

190 files changed

Lines changed: 3469 additions & 557 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Set update schedule for GitHub Actions
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to GitHub Actions every week
10+
interval: "weekly"

.github/workflows/build_artifacts.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,44 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: true
1517

16-
- name: Set up JDK 17
17-
uses: actions/setup-java@v3
18+
- name: Set up JDK 21
19+
uses: actions/setup-java@v5
1820
with:
19-
java-version: '17'
21+
java-version: '21'
2022
distribution: 'temurin'
2123

22-
- name: Make gradle wrapper executable
23-
if: ${{ runner.os != 'Windows' }}
24-
run: chmod +x ./gradlew
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v5
26+
with:
27+
cache-read-only: false
28+
29+
- name: Store short commit hash
30+
run: echo "short_commit_hash=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
2531

2632
- name: Build with Gradle
27-
uses: gradle/gradle-build-action@v2
33+
run: ./gradlew build
2834
env:
35+
PRESERVE_PRERELEASE_VERSION: true
2936
DISABLE_PROPERTIES_UPDATE: true
30-
with:
31-
arguments: build
37+
DISABLE_MUSIC: true
38+
VERSION_SUFFIX: ${{ env.short_commit_hash }}
39+
40+
- name: Publish to Maven
41+
run: ./gradlew publishMavenPublicationToOffsetMonkey538Repository
42+
env:
43+
PRESERVE_PRERELEASE_VERSION: true
44+
DISABLE_PROPERTIES_UPDATE: true
45+
DISABLE_MUSIC: true
46+
VERSION_SUFFIX: ${{ env.short_commit_hash }}
47+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
48+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
3249

3350
- name: Upload build artifacts
34-
uses: actions/upload-artifact@v3
51+
uses: actions/upload-artifact@v4
3552
with:
36-
name: Artifacts
37-
path: build/libs/
53+
name: Build Artifacts
54+
path: ./loader/*/*/build/libs/

.github/workflows/publish.yml

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,52 @@ jobs:
1313
contents: write
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: true
1719

18-
- name: Set up JDK 17
19-
uses: actions/setup-java@v3
20+
- name: Set up JDK 21
21+
uses: actions/setup-java@v5
2022
with:
21-
java-version: '17'
23+
java-version: '21'
2224
distribution: 'temurin'
2325

24-
- name: Make gradle wrapper executable
25-
if: ${{ runner.os != 'Windows' }}
26-
run: chmod +x ./gradlew
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v5
28+
with:
29+
cache-read-only: false
2730

2831
- name: Build with Gradle
29-
uses: gradle/gradle-build-action@v2
32+
run: ./gradlew build
3033
env:
34+
IS_RELEASE: true
3135
DISABLE_PROPERTIES_UPDATE: true
32-
with:
33-
arguments: build
36+
DISABLE_MUSIC: true
37+
VERSION_SUFFIX: ""
3438

3539
- name: Upload to Modrinth
36-
uses: gradle/gradle-build-action@v2
40+
run: ./gradlew modrinth
3741
env:
42+
IS_RELEASE: true
43+
DISABLE_PROPERTIES_UPDATE: true
44+
DISABLE_MUSIC: true
45+
VERSION_SUFFIX: ""
3846
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
3947
VERSION_NAME: ${{ github.event.release.name }}
40-
with:
41-
arguments: modrinth
48+
VERSION_IS_PRERELEASE: ${{ github.event.release.prerelease }}
49+
VERSION_CHANGELOG: ${{ github.event.release.body }}
50+
51+
- name: Publish to Maven
52+
run: ./gradlew publishMavenPublicationToOffsetMonkey538Repository
53+
env:
54+
IS_RELEASE: true
55+
DISABLE_PROPERTIES_UPDATE: true
56+
DISABLE_MUSIC: true
57+
VERSION_SUFFIX: ""
58+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
59+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
4260

4361
- name: Upload to GitHub
44-
uses: svenstaro/upload-release-action@v2
62+
uses: softprops/action-gh-release@v2
4563
with:
46-
repo_token: ${{ secrets.GITHUB_TOKEN }}
47-
file: build/libs/*.jar
48-
tag: ${{ github.ref }}
49-
overwrite: true
50-
file_glob: true
64+
files: ./loader/*/*/build/libs/*.jar

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "buildSrc"]
2+
path = buildSrc
3+
url = https://github.com/OffsetMods538/multiversion-buildscripts

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 OffsetMonkey538
3+
Copyright (c) 2023-2026 OffsetMonkey538
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
[![](https://jitpack.io/v/top.offsetmonkey538/monkeylib538.svg)](https://jitpack.io/#top.offsetmonkey538/monkeylib538)
2-
31
# MonkeyLib538
2+
[![discord-singular](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-singular_vector.svg)](https://discord.offsetmonkey538.top/)
3+
[![modrinth](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg)](https://modrinth.com/mod/monkeylib538)
4+
45
Make sure to download the correct version for the Minecraft version you're using!
56

67
A library mod used by OffsetMonkey538's mods. Required for them to run.
7-
Currently only includes a config library.
8+
Currently includes a config library and abstractions for allowing support of multiple Minecraft versions in one jar.
9+
10+
###### This mod collects anonymous usage information, read more about what's collected [here](https://github.com/OffsetMods538/MonkeyMetrics-Server). No personal data is collected. This can be disabled by modifying the config at `config/monkeylib538/telemetry.json` or by running the `/monkeylib538 telemetry set isEnabled false` command.

0 commit comments

Comments
 (0)