From fbbdfd2368fa059047f7712bfd0f810b9e7c8ed1 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Tue, 17 Jan 2023 02:53:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D1=8E=20?= =?UTF-8?q?=D0=B2=20=D1=81=D0=BE=D0=B1=D1=81=D1=82=D0=B2=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=BD=D0=B5=D0=BA=D1=81=D1=83=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 40 ++++++++++++++++++++++++++++++++++++++-- pom.xml | 29 +++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index ff49fbd..4a3fb5c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,7 +30,7 @@ steps: --- kind: pipeline type: docker -name: release-publish +name: release-maven-central trigger: ref: @@ -61,8 +61,44 @@ steps: - echo "$MAVEN_SETTINGS" >> maven-settings.xml - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key - mvn --settings maven-settings.xml -U -P ossrh,release clean deploy + +--- +kind: pipeline +type: docker +name: release-struchkov-nexus + +trigger: + ref: + - refs/tags/v.*.*.* + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + +steps: + + - name: publish struchkov nexus + image: maven:3.8.5-openjdk-17 + privileged: true + volumes: + - name: m2 + path: /root/.m2/repository + environment: + GPG_PRIVATE_KEY: + from_secret: GPG_PRIVATE_KEY + MAVEN_SETTINGS: + from_secret: MAVEN_SETTINGS + GPG_PASSPHRASE: + from_secret: GPG_PASSPHRASE + commands: + - echo "$GPG_PRIVATE_KEY" >> gpg.key + - echo "$MAVEN_SETTINGS" >> maven-settings.xml + - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key + - mvn --settings maven-settings.xml -U -P ossrh,release-struchkov-nexus clean deploy + --- kind: signature -hmac: b723bf6653b2825acdb1de24d88acc510d58c7336f642e71ed0ba0489a7066eb +hmac: 207203c0c4287898e7eacea14dbff38618650430e07a10438832e36eb501ab52 ... diff --git a/pom.xml b/pom.xml index 2a7947f..04c68ec 100644 --- a/pom.xml +++ b/pom.xml @@ -344,6 +344,35 @@ + + release-struchkov-nexus + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + struchkov-nexus + https://nexus.struchkov.dev/nexus/ + true + true + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-gpg-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + snapshot