Skip to content

Commit

Permalink
fix maven deploy gpg key issue
Browse files Browse the repository at this point in the history
Signed-off-by: chenxu <[email protected]>
  • Loading branch information
dmetasoul01 committed Jul 17, 2024
1 parent a872141 commit 2892cc7
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,22 @@ jobs:
java-version: '8'
distribution: 'temurin'
cache: maven
java-package: 'jdk'
check-latest: true
server-id: 'ossrh'
server-username: OSSRH_USERNAME # Env var that holds your OSSRH user name
server-password: OSSRH_PASSWORD # Env var that holds your OSSRH user pw
gpg-private-key: ${{ secrets.MAVEN_SIGN_GPG_KEY }}
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Release to Maven Central Repository
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.MAVEN_SIGN_GPG_KEY }}
gpg_passphrase: ${{ secrets.MAVEN_SIGN_GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USERNAME }}
nexus_password: ${{ secrets.OSSRH_TOKEN }}
maven_goals_phases: "deploy"
maven_args: "-DskipTests -Dmaven.test.skip=true"
maven_profiles: "cross-build,release-sign-artifacts"
run: |
mvn -U -B deploy -Pcross-build -Prelease-sign-artifacts -DskipTests -Dmaven.test.skip=true
env:
SIGN_KEY_PASS: ${{ secrets.MAVEN_SIGN_GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 comments on commit 2892cc7

Please sign in to comment.