2323 FORCE_COLOR : 1 # Request colored output from CLI tools supporting it
2424 MYPY_FORCE_COLOR : 1
2525 PY_COLORS : 1
26+ UPSTREAM_REPOSITORY_ID : >-
27+ 13258039
28+
29+ permissions : {}
2630
2731jobs :
2832
33+ pre-setup :
34+ name : Pre-Setup global build settings
35+ runs-on : ubuntu-latest
36+ outputs :
37+ upstream-repository-id : ${{ env.UPSTREAM_REPOSITORY_ID }}
38+ release-requested : >-
39+ ${{
40+ (
41+ github.event_name == 'push'
42+ && github.ref_type == 'tag'
43+ )
44+ && true
45+ || false
46+ }}
47+ steps :
48+ - name : Dummy
49+ if : false
50+ run : |
51+ echo "Pre-setup step"
52+
2953 lint :
3054 name : Linter
3155 runs-on : ubuntu-latest
@@ -243,8 +267,11 @@ jobs:
243267
244268 benchmark :
245269 name : Benchmark
246- needs : gen_llhttp
247-
270+ needs :
271+ - gen_llhttp
272+ - pre-setup # transitive, for accessing settings
273+ if : >-
274+ needs.pre-setup.outputs.upstream-repository-id == github.repository_id
248275 runs-on : ubuntu-latest
249276 timeout-minutes : 12
250277 steps :
@@ -279,7 +306,6 @@ jobs:
279306 uses : CodSpeedHQ/action@v4
280307 with :
281308 mode : instrumentation
282- token : ${{ secrets.CODSPEED_TOKEN }}
283309 run : python -Im pytest --no-cov --numprocesses=0 -vvvvv --codspeed
284310
285311
@@ -301,9 +327,10 @@ jobs:
301327 pre-deploy :
302328 name : Pre-Deploy
303329 runs-on : ubuntu-latest
304- needs : check
305- # Run only on pushing a tag
306- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
330+ needs :
331+ - check
332+ - pre-setup # transitive, for accessing settings
333+ if : fromJSON(needs.pre-setup.outputs.release-requested)
307334 steps :
308335 - name : Dummy
309336 run : |
@@ -443,8 +470,13 @@ jobs:
443470
444471 deploy :
445472 name : Deploy
446- needs : [build-tarball, build-wheels]
473+ needs :
474+ - build-tarball
475+ - build-wheels
476+ - pre-setup # transitive, for accessing settings
447477 runs-on : ubuntu-latest
478+ if : >-
479+ needs.pre-setup.outputs.upstream-repository-id == github.repository_id
448480
449481 permissions :
450482 contents : write # IMPORTANT: mandatory for making GitHub Releases
0 commit comments