diff --git a/.drone.yml b/.drone.yml index 9a84ac3..2e9fb3b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,11 +1,51 @@ +--- kind: pipeline type: docker -name: haiti-framework +name: snapshot-publish + +trigger: + branch: + - develop + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + +steps: + + - name: publish + image: maven:3.8.5-openjdk-17 + privileged: true + volumes: + - name: m2 + path: /root/.m2/repository + environment: + MAVEN_SETTINGS: + from_secret: MAVEN_SETTINGS + commands: + - echo "$MAVEN_SETTINGS" >> maven-settings.xml + - mvn --settings maven-settings.xml -U -P snapshot clean deploy + +--- +kind: pipeline +type: docker +name: release-maven-central + +trigger: + ref: + - refs/tags/v.*.*.* + +volumes: + - name: m2 + host: + path: /drone/volume/m2 steps: - name: publish maven central - image: maven:3.8.6-openjdk-11 + image: maven:3.8.5-openjdk-17 + privileged: true volumes: - name: m2 path: /root/.m2/repository @@ -22,6 +62,11 @@ steps: - 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.*.*.* @@ -29,4 +74,30 @@ trigger: volumes: - name: m2 host: - path: /drone/volume/m2 \ No newline at end of file + 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: 43c584bfa9959fef91227a75238af6f91762f0e91472c8eaafaa8b1139c18b0e + +... diff --git a/pom.xml b/pom.xml index 856d19d..dfb7dad 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti haiti-dependencies - 2.3.4 + 2.4.0-SNAPSHOT pom Haiti Framework @@ -35,11 +35,9 @@ UTF-8 UTF-8 - 2.3.4 + ${project.version} ${haiti.ver} ${haiti.ver} - ${haiti.ver} - ${haiti.ver} 2.2 1.0.1 @@ -91,11 +89,6 @@ nexus-staging-maven-plugin ${plugin.nexus.staging.ver} true - - ossrh - https://s01.oss.sonatype.org/ - true - org.apache.maven.plugins @@ -150,6 +143,10 @@ + + org.apache.maven.plugins + maven-release-plugin + org.apache.maven.plugins maven-compiler-plugin @@ -173,6 +170,11 @@ org.sonatype.plugins nexus-staging-maven-plugin + + ossrh + https://s01.oss.sonatype.org/ + true + org.apache.maven.plugins @@ -189,21 +191,105 @@ + + 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 + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + struchkov-nexus + https://nexus.struchkov.dev/nexus/ + true + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + - - scm:git:https://github.com/haiti-projects/haiti-framework.git - https://github.com/haiti-projects/haiti-framework - scm:git:https://github.com/haiti-projects/haiti-framework.git - + + + struchkov-nexus-release + https://nexus.struchkov.dev/repository/maven-releases/ + + true + always + fail + + + false + + + + struchkov-nexus-snapshot + https://nexus.struchkov.dev/repository/maven-snapshots/ + + false + + + true + always + warn + + + + + struchkov-nexus-release + https://nexus.struchkov.dev/repository/maven-releases/ + - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots + struchkov-nexus-snapshot + https://nexus.struchkov.dev/repository/maven-snapshots/ + + scm:git:https://git.struchkov.dev/Haiti/haiti-framework.git + https://git.struchkov.dev/Haiti/haiti-framework + scm:git:https://git.struchkov.dev/Haiti/haiti-framework.git + + uPagge