Skip to content

Commit

Permalink
porting: 1.21.4 neoforge porting (wip)
Browse files Browse the repository at this point in the history
Co-authored-by: lainio24 <[email protected]>
  • Loading branch information
WakelessSloth56 and lainio24 committed Jan 17, 2025
1 parent b4f323e commit 12cc282
Show file tree
Hide file tree
Showing 242 changed files with 3,859 additions and 13,713 deletions.
134 changes: 61 additions & 73 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,61 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: auto-release

on:
push:
tags:
- 'v*'

jobs:
first:
name: Check release tag
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: |
prop() { grep -P "^\s*[^#]?${1}=.*$" './gradle.properties' | cut -d'=' -f2; }
echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "MOD_VERSION=`echo $(prop "mod_version")`" >> $GITHUB_ENV
- run: if [ "${{env.GIT_TAG}}" != "v${{env.MOD_VERSION}}" ];then exit 1;fi

second:
name: Build and publish
runs-on: ubuntu-latest
needs: first
permissions:
contents: write
packages: write

steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
architecture: 'x64'
cache: 'gradle'

- name: Build and publish with Gradle
env:
IS_RELEASE: true
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
ORG_GRADLE_PROJECT_signingKey: ${{secrets.RELEASE_SIGNING_GPG_PRIVATE_KEY}}
ORG_GRADLE_PROJECT_signingPassword: ${{secrets.RELEASE_SIGNING_GPG_PASSPHRASE}}
AUIOC_MAVEN_USERNAME: ${{secrets.AUIOC_MAVEN_USERNAME}}
AUIOC_MAVEN_TOKEN: ${{secrets.AUIOC_MAVEN_TOKEN}}
run: |
chmod +x ./gradlew
./gradlew runData
./gradlew build publish generateUpdateJson
mkdir ./pages
cp -r ./build/tmp/update/. ./pages/
- name: Update update JSON
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: false
target-folder: update
branch: gh-pages
folder: pages

- name: Github release
uses: softprops/action-gh-release@v1
with:
files: |
build/libs/*.jar
build/libs/*.asc
name: auto-release

on:
push:
tags:
- 'v*'

jobs:
first:
name: Check release tag
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: |
prop() { grep -P "^\s*[^#]?${1}=.*$" './gradle.properties' | cut -d'=' -f2; }
echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "MOD_VERSION=`echo $(prop "mod_version")`" >> $GITHUB_ENV
- run: if [ "${{env.GIT_TAG}}" != "v${{env.MOD_VERSION}}" ];then exit 1;fi

second:
name: Build and publish
runs-on: ubuntu-latest
needs: first
permissions:
contents: write
packages: write

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
architecture: 'x64'
cache: 'gradle'

- name: Build and publish with Gradle
env:
IS_RELEASE: true
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
ORG_GRADLE_PROJECT_signingKey: ${{secrets.RELEASE_SIGNING_GPG_PRIVATE_KEY}}
ORG_GRADLE_PROJECT_signingPassword: ${{secrets.RELEASE_SIGNING_GPG_PASSPHRASE}}
AUIOC_MAVEN_USERNAME: ${{secrets.AUIOC_MAVEN_USERNAME}}
AUIOC_MAVEN_TOKEN: ${{secrets.AUIOC_MAVEN_TOKEN}}
run: |
chmod +x ./gradlew
./gradlew build publish
- name: Github release
uses: softprops/action-gh-release@v1
with:
files: |
build/libs/*.jar
build/libs/*.asc
12 changes: 5 additions & 7 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: dev-build

on:
Expand All @@ -18,24 +15,25 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
architecture: 'x64'
cache: 'gradle'

- name: Build with Gradle
run: |
chmod +x ./gradlew
./gradlew runData
./gradlew build
echo "ARTIFACT_NAME=`cat ./build/tmp/artifact-name.txt`" >> $GITHUB_ENV
- name: Upload build artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: ${{env.ARTIFACT_NAME}}
path: build/libs
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@ out
*.ipr
*.iws
*.iml
.idea

# vscode
.vscode
.idea/*
!.idea/copyright
!.idea/scopes

# gradle
build
.gradle

# other
**/test/DevTest*.java
src/generated
eclipse
run
runs
run-data
src/generated

repo
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "scripts"]
path = scripts
url = [email protected]:auioc/mcmod-scripts.git
6 changes: 6 additions & 0 deletions .idea/copyright/auioc_mcmod_gplv3.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/scopes/src_auioc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/scopes/src_coremods.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@

Shared library for AH's Minecraft mods.

**! 1.21 Porting is in Progress !**

[![GitHub license](https://img.shields.io/github/license/auioc/arnicalib-mcmod?style=flat-square)](/LICENSE)
[![GitHub release](https://img.shields.io/github/v/release/auioc/arnicalib-mcmod?style=flat-square)](https://github.com/auioc/arnicalib-mcmod/releases/latest)
<!--[![GitHub release](https://img.shields.io/github/v/release/auioc/arnicalib-mcmod?style=flat-square)](https://github.com/auioc/arnicalib-mcmod/releases/latest)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/auioc/arnicalib-mcmod/dev-build.yml?branch=1.20-forge&label=dev%20build&style=flat-square)](https://github.com/auioc/arnicalib-mcmod/actions/workflows/dev-build.yml)
<br/>
![Minecraft](https://img.shields.io/static/v1?label=Minecraft&message=1.20.4&color=00aa00&style=flat-square)
[![NeoForge](https://img.shields.io/static/v1?label=NeoForge&message=20.4.80-beta&color=e04e14&style=flat-square)](https://neoforged.net/)
<br/>-->
![Minecraft](https://img.shields.io/static/v1?label=Minecraft&message=1.21.4&color=00aa00&style=flat-square)
[![NeoForge](https://img.shields.io/static/v1?label=NeoForge&message=21.4.50-beta&color=e04e14&style=flat-square)](https://neoforged.net/)
![Mappings](https://img.shields.io/static/v1?label=Mappings&message=parchment&color=00aa00&style=flat-square)
<br/>
![OpenJDK](https://img.shields.io/static/v1?label=OpenJDK&message=17&color=brightgreen&logo=java&style=flat-square)
[![Gradle](https://img.shields.io/static/v1?label=Gradle&message=8.1.1&color=brightgreen&logo=gradle&style=flat-square)](https://docs.gradle.org/8.1.1/release-notes.html)
![OpenJDK](https://img.shields.io/static/v1?label=OpenJDK&message=21&color=brightgreen&logo=java&style=flat-square)
[![Gradle](https://img.shields.io/static/v1?label=Gradle&message=8.11.1&color=brightgreen&logo=gradle&style=flat-square)](https://docs.gradle.org/8.11.1/release-notes.html)

</div>

<!--
## For Developers
There are two ways to use this mod in your workspace:
Expand Down Expand Up @@ -75,6 +79,8 @@ If you do not want to or can not use the maven repository:
implementation files("libs/arnicalib-<VERSION>.jar")
```
-->

## Maintainers

- [@WakelessSloth56](https://github.com/WakelessSloth56)
Expand Down
Loading

0 comments on commit 12cc282

Please sign in to comment.