Skip to content

Commit

Permalink
fix OSSRH_GPG_SECRET_KEY 4
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Dec 23, 2023
1 parent 09a6d29 commit f0a22e2
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/maven_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,33 @@ on:
jobs:
deploy:
name: Deploy Snapshot
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'main'
fetch-depth: 0
- name: Install gpg secret key
run: |
mkdir -p ~/.gnupg/private-keys-v1.d
chmod 700 ~/.gnupg/private-keys-v1.d
echo -n ${{ secrets.OSSRH_GPG_SECRET_KEY }} | base64 --decode | gpg --import
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN

- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg_passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USERNAME }}
nexus_password: ${{ secrets.OSSRH_TOKEN }}
- name: Deploy to Maven Central
run: |
cat ~/.m2/settings.xml
echo $MAVEN_USERNAME
echo $MAVEN_CENTRAL_TOKEN
mvn clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}

0 comments on commit f0a22e2

Please sign in to comment.