diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index b9494d1..44153d1 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -4,6 +4,7 @@ name: Maven Package on: + workflow_dispatch: push: # Sequence of patterns matched against refs/tags tags: @@ -39,10 +40,10 @@ jobs: java-version: 11 distribution: temurin cache: maven - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - server-username: OSSRH_USERNAME # env variable for username in deploy - server-password: OSSRH_PASSWORD # env variable for token in deploy - gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase + server-id: central # Value of the distributionManagement/repository/id field of the pom.xml + server-username: MAVEN_CENTRAL_USER # env variable for username in deploy + server-password: MAVEN_CENTRAL_PASSWORD # env variable for token in deploy + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Build and Verify with Maven run: mvn --batch-mode --update-snapshots clean compile verify @@ -51,9 +52,9 @@ jobs: # run: mvn deploy --batch-mode --update-snapshots -P sign,!build-extras -Dmaven.test.skip=true run: mvn deploy --batch-mode --update-snapshots -P sign,!build-extras,deploy-ossrh -Dmaven.test.skip=true env: - OSSRH_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - name: Set up Java for publishing to GitHub Packages uses: actions/setup-java@v4 @@ -62,6 +63,7 @@ jobs: distribution: temurin cache: maven + - name: Publish to GitHub Packages # -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/csowada/ebus run: mvn deploy --batch-mode --update-snapshots -P !sign,!build-extras,!deploy-ossrh,deploy-github -Dmaven.test.skip=true diff --git a/BUILD-HELP.md b/BUILD-HELP.md index a56296e..4603121 100644 --- a/BUILD-HELP.md +++ b/BUILD-HELP.md @@ -5,4 +5,8 @@ ```bash # create a new release mvn gitflow:release + + +mvn deploy --batch-mode --update-snapshots -P sign,!build-extras,deploy-ossrh -Dmaven.test.skip=true + ``` \ No newline at end of file diff --git a/pom.xml b/pom.xml index 8c57e59..7074a99 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ org.apache.felix maven-bundle-plugin - 3.5.1 + 5.1.9 true @@ -175,7 +175,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.2.8 sign-artifacts @@ -207,7 +207,7 @@ org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.3.1 attach-sources @@ -220,7 +220,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.0 + 3.12.0 none @@ -246,14 +246,14 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 + org.sonatype.central + central-publishing-maven-plugin + 0.9.0 true - ossrh - https://oss.sonatype.org/ - false + central + false + all @@ -261,12 +261,12 @@ - ossrh - https://oss.sonatype.org/content/repositories/snapshots + central + https://central.sonatype.com/repository/maven-snapshots/ - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + central + https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/