From 2279e53d31a94c184209751243a70cdb62ebab59 Mon Sep 17 00:00:00 2001 From: Nicolas Senave Date: Fri, 23 Feb 2024 14:35:52 +0100 Subject: [PATCH] ci: add manual maven central deploy action [skip ci] --- .github/workflows/dispatch-deploy.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/dispatch-deploy.yml diff --git a/.github/workflows/dispatch-deploy.yml b/.github/workflows/dispatch-deploy.yml new file mode 100644 index 00000000..943a4d69 --- /dev/null +++ b/.github/workflows/dispatch-deploy.yml @@ -0,0 +1,30 @@ +# Nexus staging errors can occur when trying to publish to Maven Central. +# This action is intended to manually retry the artifact deployment when this happens. +# Artifacts can never be deleted in Maven Central, use this action carefully. + +name: Manual deployment + +on: workflow_dispatch + +jobs: + deploy-maven-repo: + needs: create-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Maven Central Repository + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Deploy with Maven + run: mvn --batch-mode clean deploy -Pdeploy --no-transfer-progress + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}