Skip to main content

Preventing changes to your releases

You can enforce immutable releases for a repository or organization to prevent potential vulnerabilities.

注意

Immutable releases are currently in 公共预览版 and subject to change.

Enforcing immutable releases for your repository

  1. 在 GitHub 上,导航到存储库的主页面。

  2. 在存储库名称下,单击 “设置”。 如果看不到“设置”选项卡,请选择“”下拉菜单,然后单击“设置”。

    存储库标头的屏幕截图,其中显示了选项卡。 “设置”选项卡以深橙色边框突出显示。

  3. Scroll down to the "Releases" section, then select Enable release immutability. Be aware that immutability will only apply to future releases.

Enforcing immutable releases for your organization

  1. 在 GitHub 上,导航到组织的主页面。

  2. 在组织名称下,单击 “设置”****。 如果看不到“设置”选项卡,请选择“”下拉菜单,然后单击“设置”********。

    组织配置文件中选项卡的屏幕截图。 “设置”选项卡以深橙色标出。

  3. In the "Code, planning, and automation" section of the sidebar, select the Repository dropdown menu, then click General.

  4. In the "Releases" section of the page, select the No policy dropdown menu, then click either All repositories or Selected repositories. Be aware that immutability will only apply to future releases.

  5. If you chose Selected repositories, to the right of the dropdown menu, click . Select the repositories you want to include, then click Select repositories.