Skip to content

Publish to Maven Central #78

Publish to Maven Central

Publish to Maven Central #78

name: Publish to Maven Central
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
default: '0.0.0'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Setup GPG key information
run: |
mkdir -p ~/.gnupg
echo -n "$GPG_SIGNING_KEY_B64" | base64 --decode > /home/runner/.gnupg/secring.gpg
cat /home/runner/.gnupg/secring.gpg
env:
GPG_SIGNING_KEY_B64: ${{ secrets.GPG_PRIVATE_KEY_B64 }}
- name: Publish package
run: ./gradlew publishToSonatype closeSonatypeStagingRepository -Psigning.password="${SIGP}"
env:
SIGP: ${{ secrets.GPG_PASSPHRASE }}