How to maintain several versions
The conda-forge workflow assumes that a push to any branch in the feedstock repository will result in a build being uploaded to the conda-forge channel (and that's why PRs must always be opened from a fork!).
Most feedstocks only need main for their builds, since the package has a single release line, and new releases always imply a later version. However, some packages may maintain a few release lines in parallel. If you wish to maintain those in your feedstock, you will need to create a branch for each.
Create the new branch
This operation can only be performed by users with write acccess to the feedstock.
In the local copy of your forked repository, create a branch named after the release line you want to maintain. For example, for 3.10, it could be:
git checkout main
git pull upstream main
git checkout -b v3.10.x
Add an empty commit with the [ci skip] message so the new branch does not result in a new build process, and push it to upstream. This is one of the rare ocassions where you must push directly to the feedstock, not your fork!
git commit --allow-empty -m "[ci skip] Create new branch for v3.10.x release series"
git push -u upstream v3.10.x
Now, this branch can be selected as a target branch in the following steps.
Open a PR with the necessary changes
From the same branch, create another one to add some extra changes that will need to be reviewed in a PR:
git checkout -b setup-3.10.x
Open your conda-forge.yml file and add these lines:
bot:
abi_migration_branches:
- "v3.10.x" # or the branch name you picked
And rerender. Now, make sure to adjust the recipe file so the correct version is being built.
Once ready, push the branch to your fork (origin) and open the corresponding pull request. Don't forget to pick v3.10.x as the target branch!
In some cases, the abi_migration_branches may receive migration PRs that have already been processed. This is being looked into at regro/cf-scripts#2500. In the meantime, you can ignore these redundant PRs by closing them.