From 0d0feb995ca61c4f304c290ae5cabe3893b73c7b Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:15:27 -0400 Subject: [PATCH] Test Maven publishing --- .github/workflows/build-snapshot.yml | 6 +++++- build.gradle | 12 +++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-snapshot.yml b/.github/workflows/build-snapshot.yml index b83057f..6d98af4 100644 --- a/.github/workflows/build-snapshot.yml +++ b/.github/workflows/build-snapshot.yml @@ -4,6 +4,10 @@ name: build-snapshot on: [ push ] +env: + USERNAME: ${{ secrets.MAVEN_USERNAME }} + PASSWORD: ${{ secrets.MAVEN_SECRET }} + jobs: build: runs-on: ubuntu-latest @@ -22,7 +26,7 @@ jobs: distribution: 'temurin' java-version: 17 - name: Build artifacts - run: ./gradlew build + run: ./gradlew build publish -PtaumcRepositoryUsername="$USERNAME" -PtaumcRepositoryPassword="$PASSWORD" - name: Upload artifacts uses: actions/upload-artifact@v2 with: diff --git a/build.gradle b/build.gradle index e050dbb..4b4dd90 100644 --- a/build.gradle +++ b/build.gradle @@ -31,4 +31,14 @@ publishing { from components.java } } -} \ No newline at end of file + repositories { + maven { + name = "taumcRepository" + url = uri("https://maven.taumc.org/releases") + credentials(PasswordCredentials) + authentication { + basic(BasicAuthentication) + } + } + } +}