Skip to main content

Publishing a package

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

Who can use this feature

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

O GitHub Packages está disponível com GitHub Free, GitHub Pro, GitHub Free for organizations, GitHub Team, GitHub Enterprise Cloud, GitHub Enterprise Server 3.0 ou superior e o GitHub AE.
O GitHub Packages não está disponível para repositórios privados de contas que utilizam planos antigos por-repositório. Além disso, as contas que usam os planos de legado por repositório não podem acessar o Container registry já que essas contas são cobradas por repositório. Para obter mais informações, confira "produtos de GitHub".

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 Cloud 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.

Você pode publicar pacotes em um repositório público (pacotes públicos) para compartilhá-los com todo o GitHub ou em um repositório privado (pacotes privados) para compartilhá-los com os colaboradores ou uma organização. A repository can be connected to more than one package. To prevent confusion, make sure the README and description clearly provide information about each package.

If a new version of a package fixes a security vulnerability, you should publish a security advisory in your repository. GitHub reviews each published security advisory and may use it to send Dependabot alerts to affected repositories. For more information, see "About GitHub Security Advisories."

Publishing a package

O GitHub Packages dá suporte apenas à autenticação que usa um personal access token (classic). Para obter mais informações, confira "Como criar um personal access token".

You can publish a package to GitHub Packages using any supported package client by following the same general guidelines.

  1. Create or use an existing personal access token (classic) with the appropriate scopes for the task you want to accomplish. For more information, see "About permissions for GitHub Packages."
  2. Authenticate to GitHub Packages using your personal access token (classic) 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 "Working with a GitHub Packages registry."

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