From 1bd22be41b1821640d5ae9236d337610bbf5e4ae Mon Sep 17 00:00:00 2001 From: Christian Mesh Date: Sat, 16 Sep 2023 13:59:32 -0400 Subject: [PATCH] Update CI --- .github/workflows/build.yml | 14 +++----------- build.gradle | 23 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5198372..dd20153 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,15 +16,7 @@ jobs: ACTIONS_ALLOW_UNSECURE_COMMANDS: true - name: keyscan run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa teamopenindustry.cc >> ~/.ssh/known_hosts - - name: secrets + - name: Gradle publish env: - MAVENCI: ${{ secrets.MAVENCI }} - run: mkdir -p /home/runner/.gradle/daemon/6.9/ && echo "${MAVENCI}" >> /home/runner/.gradle/daemon/6.9/publish_key && echo "${MAVENCI}" >> publish_key - - name: Gradle uploadArchives - run: ./gradlew uploadArchives - - name: cleanup - run: rm /home/runner/.gradle/daemon/6.9/publish_key - - uses: actions/upload-artifact@v2-preview - with: - name: UniversalModCore-${{ env.ref }} - path: build/libs/UniversalModCore-*.jar + MAVENCI_PASS: ${{ secrets.MAVENCI_PASS }} + run: ./gradlew publish diff --git a/build.gradle b/build.gradle index 04a390e..bac0d5f 100644 --- a/build.gradle +++ b/build.gradle @@ -137,7 +137,28 @@ jar { } } -//jar.finalizedBy('reobfJar') +jar.finalizedBy('reobfJar') + +publishing { + publications { + mavenJava(MavenPublication) { + artifact jar + } + } + repositories { + maven { + url "sftp://teamopenindustry.cc:22/var/www/html/maven/" + credentials { + username = "mavenci" + password = System.getenv("MAVENCI_PASS") + } + } + } +} + + + + /* // Example configuration to allow publishing using the maven-publish task // we define a custom artifact that is sourced from the reobfJar output task