Skip to content

add settings.xml

add settings.xml #52

Workflow file for this run

name: Publish package to the Maven Central Repository and GitHub Packages
on:
release:
types: [created]
push:
branches: [main, develop]
jobs:
publish:
runs-on: ubuntu-latest
environment: MAVEN
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: central
server-username: ${{ secrets.USERNAME }}
server-password: ${{ secrets.PASSWORD }}
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish to the Maven Central Repository
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean deploy
env:
MAVEN_USERNAME: ${{ secrets.USERNAME }}
MAVEN_PASSWORD: ${{ secrets.PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}