diff --git a/.github/workflows/backports.yml b/.github/workflows/backports.yml new file mode 100644 index 00000000000..479c0bf9541 --- /dev/null +++ b/.github/workflows/backports.yml @@ -0,0 +1,22 @@ +--- +name: mergeit-backport + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: + - labeled + - opened + - synchronize + branches: + - main + +jobs: + changelog-labeller: + uses: ansible-network/github_actions/.github/workflows/backport-labeller.yml@main + with: + label_minor_release: backport-9 + label_bugfix_release: backport-8 diff --git a/docs/docsite/rst/collection_release.rst b/docs/docsite/rst/collection_release.rst index 8ffa2cbe2ea..c67e54f09d9 100644 --- a/docs/docsite/rst/collection_release.rst +++ b/docs/docsite/rst/collection_release.rst @@ -91,12 +91,6 @@ Ensure that your local copy of the ``main`` branch is up to date and contains al Preparing a new stable branch ----------------------------- -.. warning:: - Zuul will need updating here too. - - As part of the next release cycle please add an entry here about configuring the Zuul sanity jobs - for the new stable-6 branch. - Create and push a new ``stable-`` branch (for example ``stable-6`` for release ``6.0.0``): @@ -108,6 +102,14 @@ Create and push a new ``stable-`` branch (for example ``stable-6` git checkout -b stable-6 git push --set-upstream origin stable-6 +Create a new label ``backport-`` (for example ``backport-6`` for release ``6.0.0``). +This can either be done through the `GitHub UI `_ +or using the GH CLI if you have it installed and configured: + +.. code-block:: bash + + gh label create backport-6 -c FFAA22 --description "PR should be backported to the stable-6 branch" -R ansible-collections/amazon.aws + Create a pull request against the new branch updating any documentation links from ``main`` to the new ``stable-`` branch. @@ -121,6 +123,25 @@ Now that our new major release has been branched, we update the ``main`` branch configured as the pre-release development version for the **next** release (for example ``7.0.0-dev0`` if you're preparing ``6.0.0``). +Create a pull request against the ``main`` branch that updates the +`backport-labeller workflow `_ +so that non-breaking changes will automatically be backported to the new branch: + +.. code-block:: yaml + + --- + name: mergeit-backport + + ... + + jobs: + changelog-labeller: + uses: ansible-network/github_actions/.github/workflows/backport-labeller.yml@main + with: + label_minor_release: backport-6 + label_bugfix_release: backport-5 + + Create a pull request against the ``main`` branch updating the `galaxy.yml `_ version information and the `plugins/module_utils/common.py @@ -128,11 +149,14 @@ information and the `plugins/module_utils/common.py version information to a ``dev0`` prerelease of the next major release. This may result in deprecation errors from the sanity tests. Create issues and add entries to the relevant `sanity test ignore files `_. -(including a link to the issue) +(including a link to the issue). For an example pull request see `ansible-collections/amazon.aws#1108 `_ +(In theory both steps can be done with a single PR. However, the bot performing our automatic +merges will refuse to merge PRs which make changes to the contents of .github. Splitting the PRs up +reduces the scope of the manually merged PR.) Next steps ----------