The Wayback Machine - https://web.archive.org/web/20201019113829/https://docs.github.com/en/enterprise-server@2.22/packages/publishing-and-managing-packages/publishing-a-package

Publishing a package

You can publish a package to GitHub Packages to make the package available for others to download and re-use.

Anyone with write permissions for a repository can publish a package to that repository.

GitHub Packages is available with GitHub Free, GitHub Pro, GitHub Free for organizations, GitHub Team, GitHub Enterprise Cloud, GitHub Enterprise Server 2.22, and GitHub One.

In this article

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

Note: GitHub Packages is currently in beta for GitHub Enterprise Server 2.22. To join the beta for your instance, use the sign-up form.

About published packages

You can help people understand and use your package by providing a description and other details like installation and usage instructions on the package page. GitHub Enterprise provides metadata for each version, such as the publication date, download activity, and recent versions. For an example package page, see @Codertocat/hello-world-npm.

You can publish packages in a public repository (public packages) to share with everyone on your instance, or in a private repository (private packages) to share with collaborators or an organization. A repository can contain more than one package. To prevent confusion, make sure the README and description clearly provide information about each package.

Public packages: To prevent confusion and build problems, GitHub permanently reserves a package's name and version number. Even if an entire package is deleted, you cannot reuse the deleted package name in any repository owned by the same account.

Private packages: If all versions of a private package are deleted, you can publish a package with a previously used name and version.

To revise or replace a package version, we recommend you publish a new version of your package.

Publishing a package

You can publish a package to GitHub Packages using any package type enabled for your instance by following the same general guidelines.

  1. Create or use an existing access token with the appropriate scopes for the task you want to accomplish. For more information, see "About GitHub Packages."
  2. Authenticate to GitHub Packages using your access token and the instructions for your package client.
  3. Publish the package using the instructions for your package client.

For instructions specific to your package client, see "Using GitHub Packages with your project's ecosystem."

After you publish a package, you can view the package on GitHub. For more information, see “Viewing packages.”

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.