66 branches : ' *'
77 tags : ' v[0-9]+.*' # only trigger on 'release' tags for PyPi
88 # Ideally I would put this in the pypi job... but github syntax doesn't allow for regexes there :shrug:
9- # P.S. fuck made up yaml DSLs.
109 pull_request : # needed to trigger on others' PRs
1110 # Note that people who fork it need to go to "Actions" tab on their fork and click "I understand my workflows, go ahead and enable them".
1211 workflow_dispatch : # needed to trigger workflows manually
@@ -25,23 +24,31 @@ jobs:
2524 fail-fast : false
2625 matrix :
2726 platform : [ubuntu-latest, macos-latest, windows-latest]
28- python-version : ['3.8 ', '3.9 ', '3.10 ', '3.11 ', '3.12 ']
27+ python-version : ['3.9 ', '3.10 ', '3.11 ', '3.12 ', '3.13 ']
2928 # vvv just an example of excluding stuff from matrix
3029 # exclude: [{platform: macos-latest, python-version: '3.6'}]
3130
3231 runs-on : ${{ matrix.platform }}
3332
33+ # useful for 'optional' pipelines
34+ # continue-on-error: ${{ matrix.platform == 'windows-latest' }}
35+
3436 steps :
3537 # ugh https://github.com/actions/toolkit/blob/main/docs/commands.md#path-manipulation
3638 - run : echo "$HOME/.local/bin" >> $GITHUB_PATH
3739
38- - uses : actions/setup-python @v4
40+ - uses : actions/checkout @v4
3941 with :
40- python-version : ${{ matrix.python-version }}
42+ submodules : recursive
43+ fetch-depth : 0 # nicer to have all git history when debugging/for tests
4144
42- - uses : actions/checkout@v3
45+ - uses : actions/setup-python@v5
4346 with :
44- submodules : recursive
47+ python-version : ${{ matrix.python-version }}
48+
49+ - uses : astral-sh/setup-uv@v5
50+ with :
51+ enable-cache : false # we don't have lock files, so can't use them as cache key
4552
4653 - uses : mxschmitt/action-tmate@v3
4754 if : ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
@@ -50,39 +57,42 @@ jobs:
5057 - run : bash .ci/run
5158
5259 - if : matrix.platform == 'ubuntu-latest' # no need to compute coverage for other platforms
53- uses : actions/upload-artifact@v3
60+ uses : actions/upload-artifact@v4
5461 with :
62+ include-hidden-files : true
5563 name : .coverage.mypy_${{ matrix.platform }}_${{ matrix.python-version }}
5664 path : .coverage.mypy/
5765
5866
5967 pypi :
6068 runs-on : ubuntu-latest
6169 needs : [build] # add all other jobs here
62-
70+ permissions :
71+ # necessary for Trusted Publishing
72+ id-token : write
6373 steps :
6474 # ugh https://github.com/actions/toolkit/blob/main/docs/commands.md#path-manipulation
6575 - run : echo "$HOME/.local/bin" >> $GITHUB_PATH
6676
67- - uses : actions/setup-python @v4
77+ - uses : actions/checkout @v4
6878 with :
69- python-version : ' 3.8 '
79+ submodules : recursive
7080
71- - uses : actions/checkout@v3
81+ - uses : actions/setup-python@v5
7282 with :
73- submodules : recursive
83+ python-version : ' 3.10'
84+
85+ - uses : astral-sh/setup-uv@v5
86+ with :
87+ enable-cache : false # we don't have lock files, so can't use them as cache key
7488
7589 - name : ' release to test pypi'
7690 # always deploy merged master to test pypi
7791 if : github.event_name != 'pull_request' && github.event.ref == 'refs/heads/master'
78- env :
79- TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD_TEST }}
80- run : pip3 install --user --upgrade build twine && .ci/release --test
92+ run : .ci/release-uv --use-test-pypi
8193
8294 - name : ' release to pypi'
8395 # always deploy tags to release pypi
8496 # NOTE: release tags are guarded by on: push: tags on the top
8597 if : github.event_name != 'pull_request' && startsWith(github.event.ref, 'refs/tags')
86- env :
87- TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
88- run : pip3 install --user --upgrade build twine && .ci/release
98+ run : .ci/release-uv
0 commit comments