From e411b1683e04d6127bd58ad48d61ccbc2120a20f Mon Sep 17 00:00:00 2001 From: darksaid98 Date: Tue, 28 May 2024 14:45:54 +0200 Subject: [PATCH] ci: publish snapshots to maven repo --- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 13 ++++--------- build.gradle.kts | 10 +++++++++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c278bc..7c5f507 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: # Build with Gradle & Publish to Maven repository - name: Build with Gradle - run: ./gradlew clean build publish -PcustomVersion=${{ steps.version.outputs.version }} + run: ./gradlew clean build publishAllPublicationsToReleasesRepository -PcustomVersion=${{ steps.version.outputs.version }} env: MAVEN_USERNAME: ${{ secrets.MAVEN_NAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_SECRET }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9db9b0b..23bc2c1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,12 +45,7 @@ jobs: # Build with Gradle - name: Build with Gradle - run: ./gradlew clean build -PcustomVersion=${{ steps.version.outputs.version }}-SNAPSHOT-${{ github.run_number }} --info - - # Upload build results - - name: Upload build results - uses: actions/upload-artifact@v4 - with: - name: Build ${{ steps.version.outputs.version-with-prefix }}-SNAPSHOT-${{ github.run_number }} - path: ${{ github.workspace }}/build/libs/ - retention-days: 3 + run: ./gradlew clean build publishAllPublicationsToSnapshotsRepository -PcustomVersion=${{ steps.version.outputs.version }}-SNAPSHOT-${{ github.run_number }} --info + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_NAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_SECRET }} diff --git a/build.gradle.kts b/build.gradle.kts index 608ae66..97ecbec 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -117,12 +117,20 @@ publishing { repositories { maven { - name = "milkdrinkers" + name = "releases" url = uri("https://maven.athyrium.eu/releases") credentials { username = System.getenv("MAVEN_USERNAME") password = System.getenv("MAVEN_PASSWORD") } } + maven { + name = "snapshots" + url = uri("https://maven.athyrium.eu/snapshots") + credentials { + username = System.getenv("MAVEN_USERNAME") + password = System.getenv("MAVEN_PASSWORD") + } + } } } \ No newline at end of file