@@ -11,11 +11,14 @@ defaults:
1111 run :
1212 shell : bash
1313
14+ env :
15+ git-depth : 0 # Depth to search for tags.
16+
1417jobs :
1518 black :
1619 runs-on : ubuntu-20.04
1720 steps :
18- - uses : actions/checkout@v2
21+ - uses : actions/checkout@v3
1922 - name : Install Black
2023 run : pip install black
2124 - name : Run Black
2427 isort :
2528 runs-on : ubuntu-20.04
2629 steps :
27- - uses : actions/checkout@v2
30+ - uses : actions/checkout@v3
2831 - name : Install isort
2932 run : pip install isort
3033 - name : isort
4144 flake8 :
4245 runs-on : ubuntu-20.04
4346 steps :
44- - uses : actions/checkout@v2
47+ - uses : actions/checkout@v3
4548 - name : Install Flake8
4649 run : pip install Flake8
4750 - name : Flake8
5356 mypy :
5457 runs-on : ubuntu-20.04
5558 steps :
56- - uses : actions/checkout@v2
59+ - uses : actions/checkout@v3
5760 - name : Checkout submodules
5861 run : git submodule update --init --recursive --depth 1
5962 - name : Install Python dependencies
7679 sdl-version : ["2.0.14", "2.0.16"]
7780 fail-fast : true
7881 steps :
79- - uses : actions/checkout@v1 # v1 required to build package.
82+ - uses : actions/checkout@v3
83+ with :
84+ fetch-depth : ${{ env.git-depth }}
8085 - name : Checkout submodules
8186 run : git submodule update --init --recursive --depth 1
8287 - name : Build package
@@ -101,9 +106,9 @@ jobs:
101106 fail-fast : false
102107
103108 steps :
104- # v2 breaks `git describe` so v1 is needed.
105- # https://github.com/actions/checkout/issues/272
106- - uses : actions/checkout@v1
109+ - uses : actions/checkout@v3
110+ with :
111+ fetch-depth : ${{ env.git-depth }}
107112 - name : Checkout submodules
108113 run : |
109114 git submodule update --init --recursive --depth 1
@@ -197,7 +202,9 @@ jobs:
197202 arch : ["x86_64", "aarch64"]
198203 build : ["cp37-manylinux*", "pp37-manylinux*"]
199204 steps :
200- - uses : actions/checkout@v1
205+ - uses : actions/checkout@v3
206+ with :
207+ fetch-depth : ${{ env.git-depth }}
201208 - name : Set up QEMU
202209 if : ${{ matrix.arch == 'aarch64' }}
203210 uses : docker/setup-qemu-action@v1
@@ -248,13 +255,15 @@ jobs:
248255 matrix :
249256 python : ["cp38-*_universal2", "cp38-*_x86_64", "cp38-*_arm64", "pp37-*"]
250257 steps :
251- # v2 breaks `git describe` so v1 is needed.
252- # https://github.com/actions/checkout/issues/272
253- - uses : actions/checkout@v1
258+ - uses : actions/checkout@v3
259+ with :
260+ fetch-depth : ${{ env.git-depth }}
254261 - name : Checkout submodules
255262 run : git submodule update --init --recursive --depth 1
256263 - name : Print git describe
257- run : git describe
264+ # "--tags" is required to workaround actions/checkout's broken annotated tag handing.
265+ # https://github.com/actions/checkout/issues/290
266+ run : git describe --tags
258267 - name : Install Python dependencies
259268 run : pip3 install wheel twine -r requirements.txt
260269 - name : Prepare package
0 commit comments