Skip to main content

Cette version de GitHub Enterprise Server n'est plus disponible depuis le 2024-09-25. Aucune publication de correctifs n’est effectuée, même pour les problèmes de sécurité critiques. Pour de meilleures performances, une sécurité améliorée et de nouvelles fonctionnalités, effectuez une mise à niveau vers la dernière version de GitHub Enterprise. Pour obtenir de l’aide sur la mise à niveau, contactez le support GitHub Enterprise.

Gestion des mises en production dans un référentiel

Vous pouvez créer des mises en production pour grouper et remettre des itérations d’un projet aux utilisateurs.

Qui peut utiliser cette fonctionnalité ?

Repository collaborators and people with write access to a repository can create, edit, and delete a release.

Tool navigation

About release management

You can create new releases with release notes, @mentions of contributors, and links to binary files, as well as edit or delete existing releases. You can also create, modify, and delete releases by using the Releases API. For more information, see REST API endpoints for releases in the REST API documentation.

Creating a release

  1. On GitHub, navigate to the main page of the repository.

  2. To the right of the list of files, click Releases.

    Screenshot of the main page of a repository. A link, labeled "Releases", is highlighted with an orange outline.

  3. At the top of the page, click Draft a new release.

  4. To choose a tag for the release, select the Choose a tag dropdown menu.

    • To use an existing tag, click the tag.
    • To create a new tag, type a version number for your release, then click Create new tag.
  5. If you created a new tag, select the Target dropdown menu, then click the branch that contains the project you want to release.

  6. Optionally, above the description field, select the Previous tag dropdown menu, then click the tag that identifies the previous release.

    Screenshot of the "New release" form. A dropdown menu, labeled "Previous tag: auto", is highlighted with an orange outline.

  7. In the "Release title" field, type a title for your release.

  8. In the "Describe this release" field, type a description for your release. If you @mention anyone in the description, the published release will include a Contributors section with an avatar list of all the mentioned users. Alternatively, you can automatically generate your release notes by clicking Generate release notes.

  9. Optionally, to include binary files such as compiled programs in your release, drag and drop or manually select files in the binaries box.

  10. Optionally, to notify users that the release is not ready for production and may be unstable, select This is a pre-release.

  11. Optionally, select Set as latest release. If you do not select this option, the latest release label will automatically be assigned based on semantic versioning.

  12. Optionally, if GitHub Discussions is enabled for the repository, create a discussion for the release.

    • Select Create a discussion for this release.
    • Select the Category dropdown menu, then click a category for the release discussion.
  13. If you're ready to publicize your release, click Publish release. To work on the release later, click Save draft.

Note

To learn more about GitHub CLI, see "About GitHub CLI."

  1. To create a release, use the gh release create subcommand. Replace tag with the desired tag for the release.

    gh release create TAG
    
  2. Follow the interactive prompts. Alternatively, you can specify arguments to skip these prompts. For more information about possible arguments, see the GitHub CLI manual. For example, this command creates a prerelease with the specified title and notes.

    gh release create v1.3.2 --title "v1.3.2 (beta)" --notes "this is a beta release" --prerelease
    

If you @mention any GitHub Enterprise Server users in the notes, the published release on GitHub.com will include a Contributors section with an avatar list of all the mentioned users.

Editing a release

  1. On GitHub, navigate to the main page of the repository.

  2. To the right of the list of files, click Releases.

    Screenshot of the main page of a repository. A link, labeled "Releases", is highlighted with an orange outline.

  3. Next to the release you want to edit, click .

    Screenshot of a release in the releases list. A pencil icon is highlighted with an orange outline.

  4. Edit the details for the release in the form, then click Update release. If you add or remove any @mentions of GitHub users in the description, those users will be added or removed from the avatar list in the Contributors section of the release.

  1. To edit a release, use the gh release edit subcommand. Replace TAG with the tag representing the release you wish to edit. For example, to edit the title for a release, use the following code, replacing NEW-TITLE with the updated title:

    gh release edit TAG -t "NEW-TITLE"
    

    For more information about possible arguments, see the GitHub CLI manual.

Deleting a release

  1. On GitHub, navigate to the main page of the repository.

  2. To the right of the list of files, click Releases.

    Screenshot of the main page of a repository. A link, labeled "Releases", is highlighted with an orange outline.

  3. On the right side of the page, next to the release you want to delete, click .

    Screenshot of a release in the releases list. A trash icon is highlighted with an orange outline.

  4. Click Delete this release.

  1. To delete a release, use the gh release delete subcommand. Replace tag with the tag of the release to delete. Use the -y flag to skip confirmation.

    gh release delete TAG -y