Skip to content

Publish package to GitHub Packages #8

Publish package to GitHub Packages

Publish package to GitHub Packages #8

name: Publish package to GitHub Packages
on:
release:
types: [created]
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 -Dgithub.user=$GITHUB_USER -Dgithub.token=$GITHUB_TOKEN
env:
GITHUB_USER: ${{ secrets.MAVEN_REPO_USER }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}