无需发布分支的发行集合
由于未使用发布分支,本节不区分发行主要版本、次要版本或补丁版本。
发行计划和公告
- 检查集合以确定是否有要发布的已合并更改。 
- 在集合的相应固定发行问题或社区公告板以及 - communityMatrix/IRC 频道中宣布您打算发布集合。
创建发布分支
- 确保您位于本地分支的默认分支中。在以下示例中,我们使用 - main。
git status git checkout main # if needed
- 更新您的本地分支 
git pull --rebase upstream main
- 从默认分支检出一个新的发布分支 
git checkout -b release_branch
- 确保 - galaxy.yml包含正确的发布版本号。
生成变更日志
- 添加一个变更日志片段 - changelogs/fragments/X.Y.Z.yml,内容为:
release_summary: |- Write some text here that should appear as the release summary for this version. The format is reStructuredText, but not a list as for regular changelog fragments. This text will be inserted into the changelog.例如
release_summary: |- This is the minor release of the ``community.mysql`` collection. This changelog contains all changes to the modules and plugins in this collection that have been made after the previous release.
- 如果内容最近从另一个集合移动(例如,将模块从一个集合迁移到另一个集合),请确保您在 - changelogs/fragments目录中拥有所有相关的变更日志片段。如果没有,请先复制它们。
- 运行 - antsibull-changelog release --reload-plugins。此包应使用- pip install antsibull-changelog安装。
- 验证 - CHANGELOG.rst是否符合预期。
- 将 - CHANGELOG.rst和- changelogs/changelog.yaml以及可能已删除/存档的片段提交并推送到- origin存储库的- release_branch。
git commit -a -m "Release VERSION commit" git push origin release_branch
- 在集合存储库中创建一个拉取请求。如果 CI 测试通过,则合并它。 
- 检出默认分支并拉取更改 
git checkout main git pull --rebase upstream main
发布集合
- 向发行提交添加带集合版本的带注释标签。将此标签推送到 - upstream存储库将使 Zuul 在Ansible Galaxy上发布集合。
git tag -n # see current tags and their comments git tag -a NEW_VERSION -m "comment here" # the comment can be, for example, "community.postgresql: 1.2.0" git push upstream NEW_VERSION
- 等待集合的Ansible Galaxy页面上发布新版本。它将显示在可下载的 tarball 列表中。 
- 将 - galaxy.yml文件中的版本更新为下一个**预期**版本。添加到- upstream的默认分支,提交并推送。
- 为新标签添加一个 GitHub 发布。标题应为版本,内容为 - See https://github.com/ansible-collections/community.xxx/blob/main/CHANGELOG.rst for all changes。
- 通过Bullhorn 新闻通讯宣布发布。 
- 在步骤 3 中提到的集合的固定发行问题/社区公告板以及 - communityMatrix/IRC 频道中宣布发布。
