I used the new GitHub Code Search to figure out how to do this. I searched for:
3.11 path:workflows/*.yml
And found this example from urllib3 which showed that the version tag to use is:
3.11-dev
Update 28th Noveber 2022:
3.12-devnow works for Python 3.12 preview
I added that to my test matrix like so:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# ...
Here's the full workflow.