Skip to content

Publish package to the Maven Central Repository #6

Publish package to the Maven Central Repository

Publish package to the Maven Central Repository #6

Workflow file for this run

name: Publish package to the Maven Central Repository
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: GPG_PRIVATE_KEY
gpg-passphrase: GPG_PASSPHRASE
- name: Publish package
run: mvn -B deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}