Skip to content

chore: move gpg in profile used by the Release action #1

chore: move gpg in profile used by the Release action

chore: move gpg in profile used by the Release action #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
defaults:
run:
shell: bash
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Prepare environment
env:
SONATYPE_PGP_SECRET: ${{ secrets.SONATYPE_PGP_SECRET }}
run: |
echo -n "$SONATYPE_PGP_SECRET" | base64 --decode | gpg --batch --import
- name: Deploy
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SONATYPE_PGP_PASSPHRASE }}
run: |
mvn --batch-mode deploy -Dgpg.passphrase="${{ secrets.SONATYPE_PGP_PASSPHRASE }}" -PRelease