From 3b30bfe91ece9ddd10d8c477ddbb74ee069fa698 Mon Sep 17 00:00:00 2001 From: ZhuRuoLing Date: Fri, 6 Sep 2024 23:01:43 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E5=88=A0=E9=99=A4println?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-ci.yml | 67 +++++++++++++++++++ .../lib/registrator/builder/BlockBuilder.java | 2 - 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/dev-ci.yml diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml new file mode 100644 index 0000000..0983ad8 --- /dev/null +++ b/.github/workflows/dev-ci.yml @@ -0,0 +1,67 @@ +name: CI for Mod +on: + push: + branches: + - dev/** + paths: + - src/** + - build.gradle + - gradle.properties + - settings.gradle + +jobs: + build: + runs-on: ubuntu-latest + env: + CI_BUILD: true + PR_BUILD: false + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: validate gradle wrapper + uses: gradle/actions/wrapper-validation@v3 + + - name: Read Properties + id: 'properties' + uses: christian-draeger/read-properties@1.1.1 + with: + path: gradle.properties + properties: 'mod_id mod_name java_version' + + - name: Setup Java ${{ steps.properties.outputs.java_version }} + uses: actions/setup-java@v3.6.0 + with: + distribution: zulu + java-version: ${{ steps.properties.outputs.java_version }} + + - name: make gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + + - name: Build with Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Build + run: ./gradlew build + + - name: Find correct JAR + id: find-jar + run: | + output="$(find build/libs/ ! -name "*-dev.jar" ! -name "*-sources.jar" -type f -printf "%f\n")" + echo "jarname=$output" >> $GITHUB_OUTPUT + + - name: capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '17' }} + uses: actions/upload-artifact@v3.1.1 + with: + name: ${{ steps.find-jar.outputs.jarname }} + path: build/libs/${{ steps.find-jar.outputs.jarname }} + + - name: Publish to maven + run: ./gradlew publish + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USER }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASS }} + continue-on-error: true diff --git a/common/src/main/java/dev/anvilcraft/lib/registrator/builder/BlockBuilder.java b/common/src/main/java/dev/anvilcraft/lib/registrator/builder/BlockBuilder.java index 79b185e..8b055f5 100644 --- a/common/src/main/java/dev/anvilcraft/lib/registrator/builder/BlockBuilder.java +++ b/common/src/main/java/dev/anvilcraft/lib/registrator/builder/BlockBuilder.java @@ -137,7 +137,6 @@ public T build() { @Override public BlockEntry register() { if (this.recipeFunction != null){ - System.out.println("register itemBuilder = " + itemBuilder); this.itemBuilder.recipe( (itemEntry1, registratorRecipeProvider) -> recipeFunction.accept(itemEntry1, registratorRecipeProvider) ); @@ -153,7 +152,6 @@ public BlockEntry register() { } public BlockBuilder recipe(BiConsumer, RegistratorRecipeProvider> fn) { - System.out.println("itemBuilder = " + itemBuilder); this.recipeFunction = fn; return this; }