Q:

How to push an artefact to maven.pkg.github.com? 

How to push an artefact / Jar to maven.pkg.github.com ?  Let's say I have a maven project, and I want to build and push this artefact to github package repository.  

A:

full documentation provided below link
Maven for use with GitHub Packages
to summarize:
generate a new personal access token from the github settings
add repository and token info in your settings.xml
deploy using 
mvn deploy -Dregistry=https://maven.pkg.github.com/yourusername -Dtoken=yor_token  

