Skip to content

Release Build

Release Build #8

Workflow file for this run

name: Release Build
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch: {}
jobs:
publishToMaven:
runs-on: ubuntu-latest
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSPHRASE: ${{ secrets.SIGNING_KEY_PASSPHRASE }}
SIGNING_SECRET_KEY_RING_FILE: ${{ github.workspace }}/.gnupg/secring.gpg
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Import GPG key
run: echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import
- name: Debug GPG directory
run: ls -la /home/runner/.gnupg
- name: Debug secret key ring file
run: ls -la /home/runner/.gnupg/secring.gpg
- name: Publish to Nexus Maven Repository
run: |
./gradlew publish \
-Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}" \
-Psigning.password="${{ secrets.SIGNING_KEY_PASSWORD }}" \
-Psigning.secretKeyRingFile="${HOME}/.gnupg/pubring.kbx"