Apache Maven, Gradle, NuGet, and RubyGems packages
The other package types are basically the same as npm and Docker: if you know the native package manager, they are really easy to use. I will only give a very brief introduction to each one.
Java with Apache Maven
For Java packages with Maven, you just have to add your package registry to the pom.xml
file:
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/user/repo</url>
</repository>
</distributionManagement>
You can then publish your package in a workflow using GITHUB_TOKEN
:
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
To retrieve packages from your development machine...