From 9faf580c865356cbb7af0ebfaf38f3ca71e2e66b Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sat, 16 Dec 2023 19:34:18 +0200 Subject: [PATCH] Set up Architectury publishing --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ build.gradle.kts | 12 ++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..be4c790 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Compile & Release + +on: + push: + branches: + - develop + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + - name: Upload to Maven + run: ./gradlew publish + env: + MAVEN_PASS: ${{ secrets.MAVEN_PASS }} diff --git a/build.gradle.kts b/build.gradle.kts index a4f4e07..51acec0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -46,4 +46,16 @@ publishing { from(components["java"]) } } + + repositories { + if (System.getenv("MAVEN_PASS") != null) { + maven { + setUrl("https://deploy.shedaniel.me/") + credentials { + username = "shedaniel" + password = System.getenv("MAVEN_PASS") + } + } + } + } }