From 994ad318ccd8a9aae714cb74b0ea8e5bf84ac547 Mon Sep 17 00:00:00 2001 From: isXander Date: Mon, 15 Apr 2024 18:03:35 +0100 Subject: Fix snapshot publishing --- .github/workflows/snapshot-publish.yml | 6 ++++-- build.gradle.kts | 8 ++++++++ stonecutter.gradle.kts | 5 +++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index 1529da3..e8e2794 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -31,8 +31,10 @@ jobs: ${{ runner.os }}-gradle- - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew publishAllPublicationsToSnapshotsRepository --no-daemon + - name: Publish with Gradle + uses: Wandalen/wretry.action@master + with: + command: ./gradlew chiseledPublishSnapshots --no-daemon env: XANDER_MAVEN_USER: ${{ secrets.REPO_USERNAME }} XANDER_MAVEN_PASS: ${{ secrets.REPO_PASSWORD }} diff --git a/build.gradle.kts b/build.gradle.kts index a930c02..5f6e0f8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -301,6 +301,14 @@ publishing { this.password = password } } + + maven(url = "https://maven.isxander.dev/snapshots") { + name = "XanderSnapshots" + credentials { + this.username = username + this.password = password + } + } tasks.getByName("publishModPublicationToXanderReleasesRepository") { dependsOn("optimizeOutputsOfRemapJar") } diff --git a/stonecutter.gradle.kts b/stonecutter.gradle.kts index 155fae7..a38066e 100644 --- a/stonecutter.gradle.kts +++ b/stonecutter.gradle.kts @@ -12,3 +12,8 @@ stonecutter registerChiseled tasks.register("chiseledPublishMods", stonecutter.c group = "mod" ofTask("releaseMod") } + +stonecutter registerChiseled tasks.register("chiseledPublishSnapshots", stonecutter.chiseled) { + group = "mod" + ofTask("publishAllPublicationsToXanderSnapshotsRepository") +} -- cgit