Skip to content
name: Publish package to GitHub Packages
on: push
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Publish package
run: ./mvnw -s "${{ github.workspace }}/scriptsAndTools/internalOrCiOnly/deploySettings.xml" deploy -Dcentral.user=$MAVEN_CENTRAL_USER -Dcentral.password=$MAVEN_CENTRAL_PASSWORD
env:
MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}