From b09978b64be46cd5331c829618a7fe8c0a12aeb8 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:52:49 -0400 Subject: [PATCH] Fix API publish --- .github/workflows/build-1214.yml | 26 +++++++------------------- build.gradle.kts | 2 ++ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-1214.yml b/.github/workflows/build-1214.yml index f2c423fb..6699a5bb 100644 --- a/.github/workflows/build-1214.yml +++ b/.github/workflows/build-1214.yml @@ -30,7 +30,7 @@ jobs: ~/.gradle/configuration-cache-* .gradle/patchCache .gradle/patched - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'buildSrc/**/*.kt', 'patches/**/*.patch') }} + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'patches/**/*.patch') }} restore-keys: | ${{ runner.os }}-gradle- @@ -60,10 +60,9 @@ jobs: echo "org.gradle.caching=true" >> ~/.gradle/gradle.properties echo "org.gradle.configuration-cache=true" >> ~/.gradle/gradle.properties echo "org.gradle.configuration-cache.problems=warn" >> ~/.gradle/gradle.properties - echo "org.gradle.jvmargs=${{ env.GRADLE_MEMORY }} -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" >> ~/.gradle/gradle.properties + echo "org.gradle.jvmargs=${{ env.GRADLE_MEMORY }} -Dfile.encoding=UTF-8" >> ~/.gradle/gradle.properties echo "org.gradle.parallel=true" >> ~/.gradle/gradle.properties echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties - echo "kotlin.incremental=true" >> ~/.gradle/gradle.properties - name: Apply patches run: | @@ -75,20 +74,16 @@ jobs: --stacktrace --parallel \ --max-workers=$PARALLELISM \ --build-cache \ - --no-configuration-cache \ --no-daemon - name: Create MojmapPaperclipJar - run: ./gradlew createMojmapPaperclipJar --stacktrace --parallel --no-daemon --no-configuration-cache + run: ./gradlew createMojmapPaperclipJar --stacktrace --parallel --no-daemon - - name: Start API Publishing - id: publish-api + - name: Publish API + continue-on-error: true run: | - ( - ./gradlew publish --parallel --max-workers=4 > publish_api_log.txt 2>&1 - echo "API_PUBLISH_DONE=true" >> $GITHUB_ENV - ) & - echo "PUBLISH_PID=$!" >> $GITHUB_ENV + ./gradlew :leaf-api:publish + ./gradlew publishDevBundlePublicationToLeafRepository -PpublishDevBundle=true env: REPO_USER: ${{ secrets.REPO_USER }} REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }} @@ -112,13 +107,6 @@ jobs: GITHUB_REPO: ${{ github.repository }} BUILD_NUMBER: ${{ env.BUILD_NUMBER }} - - name: Wait for API Publishing - run: | - if ps -p ${{ env.PUBLISH_PID }} > /dev/null; then - wait ${{ env.PUBLISH_PID }} || true - fi - grep -i "error" publish_api_log.txt && echo "Found errors in log" || echo "No errors found" - - name: Release Leaf uses: softprops/action-gh-release@master with: diff --git a/build.gradle.kts b/build.gradle.kts index b49ba44d..665437fb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -50,7 +50,9 @@ subprojects { events(TestLogEvent.STANDARD_OUT) } } +} +allprojects { extensions.configure { repositories { maven(leafMavenPublicUrl) {