Skip to content

Publish packages to the Maven Central Repository #19

Publish packages to the Maven Central Repository

Publish packages to the Maven Central Repository #19

Workflow file for this run

name: Publish packages to the Maven Central Repository
on:
workflow_dispatch:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '8.0.352'
distribution: 'temurin'
cache: 'maven'
server-id: 'ossrh'
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Publish packages
run: mvn -U -B clean deploy -P release
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}