Maintainers publish a new Ansible Galaxy version and matching GitHub release using two automations in this repository.
Agree with the other maintainers that a release is appropriate (meeting, Slack, or whatever works for your team). If there is a general consensus, continue.
You need write access to this GitHub repository to run the changelog workflow and to merge the resulting pull request.
Review what has landed on the default branch. Release-relevant changes should already be described by YAML files under changelogs/fragments/.
Follow Semantic Versioning when picking X.Y.Z (no v prefix):
- major — breaking or incompatible API or behavior changes
- minor — new features or enhancements in a backward-compatible way
- patch — backward-compatible bug fixes, small
minor_changes, documentation-only updates, and similar low-risk changes
The workflow will refuse to run if that tag already exists on the remote, or if galaxy.yml is already at the version you enter.
- Create the labels
release-on-merge,changelog, andautomated prunder Issues → Labels if they do not exist (the changelog PR receives all three automatically). The Requires changelog job already accepts pure release diffs (see ansible-content-actionsvalidate_changelog.py); add theskip-changeloglabel only if you must open a release-style PR that also changes other paths and CI incorrectly demands a fragment. - Under Settings → Actions → General → Workflow permissions, use Read and write permissions so
GITHUB_TOKENcan open the PR and the release job can push tags and create the GitHub release.
- Open Actions: Workflow runs.
- Select Generate changelog and open release PR (
.github/workflows/generate-changelog-and-release.yml). - Click Run workflow, choose the default branch, and enter the new version as
X.Y.Z. - The workflow will:
- set
versioningalaxy.ymlto the value you entered; - run
antsibull-changelogreleaseso fragments are folded intoCHANGELOG.rstandchangelogs/changelog.yaml; - build the collection, install the tarball, and run ansible-lint (
--offline) on that snapshot—the same build/install/lint pattern as the reusable ansible-lint workflow. If lint fails, no PR is opened. - open a pull request against the default branch, labeled
release-on-merge,changelog, andautomated pr.
- set
After the PR exists, the normal CI workflow (.github/workflows/ansible-test.yml) also runs ansible-lint on the pull request, so reviewers see lint in the PR checks.
Review the PR (changelog text and version bump) before merging.
When that PR is merged into the default branch and still has release-on-merge, Release runs (.github/workflows/release.yml). In short it:
- checks out the merge commit, builds the collection with
ansible-galaxy collection build; - installs the built
.tar.gzwithansible-galaxy collection installto verify the artifact; - creates the git tag and GitHub release (notes from
CHANGELOG.rst, tarball attached); - publishes the same tarball to Ansible Galaxy (published collection).
Lint is intentionally not re-run here: it already ran when the changelog workflow prepared the tree, and again on the PR via CI before merge.
For step-by-step job logic, read .github/workflows/release.yml.
If branch protection blocks github-actions[bot] from opening or merging PRs or from pushing tags, adjust branch rules or use a PAT as your organization requires.