This document explains how to deploy Apache Maven artifacts created during the package
lifecycle phase to GitHub using GitHub Packages. You can read about working with Maven and GitHub Packages here.
Create a "classic" personal access token (PAT) here by clicking on the Generate new token button and choosing Generate new token (classic). When a new token is created you must check at least the write:packages scope. You should copy the PAT to a safe location, since you won't be able to see it again.
Use your ~/.m2/settings.xml
file to store your PAT adding the following element to the settings/servers
element: