mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Fix API publish
This commit is contained in:
26
.github/workflows/build-1214.yml
vendored
26
.github/workflows/build-1214.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
~/.gradle/configuration-cache-*
|
~/.gradle/configuration-cache-*
|
||||||
.gradle/patchCache
|
.gradle/patchCache
|
||||||
.gradle/patched
|
.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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gradle-
|
${{ runner.os }}-gradle-
|
||||||
|
|
||||||
@@ -60,10 +60,9 @@ jobs:
|
|||||||
echo "org.gradle.caching=true" >> ~/.gradle/gradle.properties
|
echo "org.gradle.caching=true" >> ~/.gradle/gradle.properties
|
||||||
echo "org.gradle.configuration-cache=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.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.parallel=true" >> ~/.gradle/gradle.properties
|
||||||
echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties
|
echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties
|
||||||
echo "kotlin.incremental=true" >> ~/.gradle/gradle.properties
|
|
||||||
|
|
||||||
- name: Apply patches
|
- name: Apply patches
|
||||||
run: |
|
run: |
|
||||||
@@ -75,20 +74,16 @@ jobs:
|
|||||||
--stacktrace --parallel \
|
--stacktrace --parallel \
|
||||||
--max-workers=$PARALLELISM \
|
--max-workers=$PARALLELISM \
|
||||||
--build-cache \
|
--build-cache \
|
||||||
--no-configuration-cache \
|
|
||||||
--no-daemon
|
--no-daemon
|
||||||
|
|
||||||
- name: Create MojmapPaperclipJar
|
- name: Create MojmapPaperclipJar
|
||||||
run: ./gradlew createMojmapPaperclipJar --stacktrace --parallel --no-daemon --no-configuration-cache
|
run: ./gradlew createMojmapPaperclipJar --stacktrace --parallel --no-daemon
|
||||||
|
|
||||||
- name: Start API Publishing
|
- name: Publish API
|
||||||
id: publish-api
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
(
|
./gradlew :leaf-api:publish
|
||||||
./gradlew publish --parallel --max-workers=4 > publish_api_log.txt 2>&1
|
./gradlew publishDevBundlePublicationToLeafRepository -PpublishDevBundle=true
|
||||||
echo "API_PUBLISH_DONE=true" >> $GITHUB_ENV
|
|
||||||
) &
|
|
||||||
echo "PUBLISH_PID=$!" >> $GITHUB_ENV
|
|
||||||
env:
|
env:
|
||||||
REPO_USER: ${{ secrets.REPO_USER }}
|
REPO_USER: ${{ secrets.REPO_USER }}
|
||||||
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
|
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
|
||||||
@@ -112,13 +107,6 @@ jobs:
|
|||||||
GITHUB_REPO: ${{ github.repository }}
|
GITHUB_REPO: ${{ github.repository }}
|
||||||
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
|
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
|
- name: Release Leaf
|
||||||
uses: softprops/action-gh-release@master
|
uses: softprops/action-gh-release@master
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ subprojects {
|
|||||||
events(TestLogEvent.STANDARD_OUT)
|
events(TestLogEvent.STANDARD_OUT)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
extensions.configure<PublishingExtension> {
|
extensions.configure<PublishingExtension> {
|
||||||
repositories {
|
repositories {
|
||||||
maven(leafMavenPublicUrl) {
|
maven(leafMavenPublicUrl) {
|
||||||
|
|||||||
Reference in New Issue
Block a user