Reputation: 886
GitHub introduced its Package Registry. It says:
It supports familiar package management tools: JavaScript (npm), Java (Maven), Ruby (RubyGems), .NET (NuGet), and Docker images.
But I couldn't find any documentation or example on how to publish a new package there. How can I accomplish this?
Upvotes: 2
Views: 827
Reputation: 6344
You will likely need to sign up for the beta first. Their docs have commands in various languages - note that GitHub Package Registry should use the language-native tools to push the package to a separate registry.
Here are some examples from https://github.com/features/package-registry.
npm
npm login --registry=https://npm.pkg.github.com --scope=@phanatic
npm publish
RubyGems
echo ":github: Bearer ${GH_TOKEN}" >> ~/.gem/credentials
gem build github_api.gemspec
gem push --key github --host https://rubygems.pkg.github.com/phanatic/github_api github_api-1.0.0.gem
Maven
mvn deploy -Dregistry=https://maven.pkg.github.com/phanatic -Dtoken=$GH_TOKEN
NuGet
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/phanatic/octokit/index.json" -UserName phanatic
nuget pack
nuget push "octokit.net.1.0.0.nupkg" -Source "GitHub"
Upvotes: 3