Skip to content

Publish to Maven Central #1

Publish to Maven Central

Publish to Maven Central #1

Workflow file for this run

name: Publish to Maven Central
on:
workflow_call:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# We need the GPG key to sign the package.
- id: install-secret-key
name: Install GPG secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "adopt"
- id: publish-to-central
name: Publish to Central Repository
run: |
mvn --update-snapshots \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
clean deploy -P release verify