Using Github Private Packages and maven in Github Actions

Publishing a package

1. Edit the pom.xml

2. Configure Github Action

Accessing and Installing the package

1. Add the project as a dependency in the pom.xml

2. Create a Private Access Token

3. Add a secret to the repository

4. Configure Github Action

  • username can be anything as it will not be considered for authentication
  • password is set to GITHUB_TOKEN_REF which refers to the GH_PAT_FOR_ACTIONS_TOKEN environment variable created in step 3.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store