1. Creating a personal access token。User Manuel --> Settings-->Developer settings-->Personal access tokens --> New personal access token, select scope read/write packages
2. publish a package
a. create a gradle project on github. Add repository and plugin as the following image. Pay attention to the uri, user, and the key. The key is generated in step 1.
b. Run './gradlew publish'
Then we can find package on github.