diff --git a/.github/workflows/master-snapshot-release.yml b/.github/workflows/master-snapshot-release.yml
index e185b65..b7b1c66 100644
--- a/.github/workflows/master-snapshot-release.yml
+++ b/.github/workflows/master-snapshot-release.yml
@@ -37,14 +37,18 @@ jobs:
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
- distribution: temurin
java-version: 17
+ distribution: temurin
cache: 'maven'
- - name: Release Maven package
- uses: samuelmeuli/action-maven-publish@v1
- with:
- maven_profiles: "release"
- gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
- nexus_username: ${{ secrets.OSSRH_USERNAME }}
- nexus_password: ${{ secrets.OSSRH_TOKEN }}
+ server-id: central
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_CENTRAL_TOKEN
+ gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE
+
+ - name: Publish to Apache Maven Central
+ run: mvn package deploy -Prelease
+ env:
+ MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
+ MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_PASSWORD }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 15a522b..0e87bb9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -15,19 +15,25 @@ jobs:
java-version: 17
distribution: temurin
cache: 'maven'
+ server-id: central
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_CENTRAL_TOKEN
+ gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE
+
- name: change version to release version
# Assume that RELEASE_VERSION will have form like: "v1.0.1". So we cut the "v"
run: ./mvnw ${MAVEN_ARGS} versions:set -DnewVersion="${RELEASE_VERSION:1}" versions:commit
env:
RELEASE_VERSION: ${{ github.event.release.tag_name }}
- - name: Release Maven package
- uses: samuelmeuli/action-maven-publish@v1
- with:
- maven_profiles: "release"
- gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
- nexus_username: ${{ secrets.OSSRH_USERNAME }}
- nexus_password: ${{ secrets.OSSRH_TOKEN }}
+
+ - name: Publish to Apache Maven Central
+ run: mvn package deploy -Prelease
+ env:
+ MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
+ MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_PASSWORD }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+
# This is separate job because there were issues with git after release step, was not able to commit changes. See history.
update-working-version:
diff --git a/pom.xml b/pom.xml
index b87f4b9..21af316 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,13 +44,6 @@
https://github.com/java-operator-sdk/operator-framework-spring-boot-starter.git/tree/master
-
-
- ossrh
- https://oss.sonatype.org/content/repositories/snapshots
-
-
-
UTF-8
17
@@ -67,6 +60,7 @@
3.11.2
3.2.8
3.3.1
+ 0.8.0
@@ -238,14 +232,15 @@
- org.sonatype.plugins
- nexus-staging-maven-plugin
- ${nexus-staging-maven-plugin.version}
+ org.sonatype.central
+ central-publishing-maven-plugin
+ ${central-publishing-maven-plugin.version}
true
- ossrh
- https://oss.sonatype.org/
- true
+ central
+ true
+ true
+ published