@@ -80,12 +80,14 @@ jobs:
80
80
'refs/heads/{0}', github.event.repository.default_branch
81
81
)
82
82
run: >-
83
- print('::set-output name=is-untagged-devel::true')
83
+ echo "is-untagged-devel=true" >> "$GITHUB_OUTPUT"
84
+ shell: bash
84
85
- name : Mark the build as "release request"
85
86
id : request-check
86
87
if : github.event_name == 'workflow_dispatch'
87
88
run : >-
88
- print('::set-output name=release-requested::true')
89
+ echo "release-requested=true" >> "$GITHUB_OUTPUT"
90
+ shell : bash
89
91
- name : Check out src from Git
90
92
if : >-
91
93
steps.request-check.outputs.release-requested != 'true'
@@ -101,31 +103,32 @@ jobs:
101
103
id: calc-cache-key-py
102
104
run: |
103
105
from hashlib import sha512
106
+ from os import environ
104
107
from sys import version
105
108
hash = sha512(version.encode()).hexdigest()
106
- print(f'::set-output name=py-hash-key::{hash}')
109
+ with open(environ['GITHUB_OUTPUT'], mode='a') as github_output:
110
+ print(f'py-hash-key={hash}', file=github_output)
107
111
- name : >-
108
112
Calculate dependency files' combined hash value
109
113
for use in the cache key
110
114
if: >-
111
115
steps.request-check.outputs.release-requested != 'true'
112
116
id: calc-cache-key-files
113
- run: |
114
- print(
115
- "::set-output name=files-hash-key::${{
116
- hashFiles(
117
+ run: >-
118
+ echo "files-hash-key=${{
119
+ hashFiles(
117
120
'requirements-dev.txt',
118
121
'setup.cfg',
119
122
'pyproject.toml'
120
- )
121
- }}",
122
- )
123
+ )
124
+ }}" >> "$GITHUB_OUTPUT"
125
+ shell: bash
123
126
- name : Get pip cache dir
124
127
id : pip-cache-dir
125
128
if : >-
126
129
steps.request-check.outputs.release-requested != 'true'
127
130
run : >-
128
- echo "::set-output name= dir:: $(python -m pip cache dir)"
131
+ echo "dir= $(python -m pip cache dir)" >> "$GITHUB_OUTPUT "
129
132
shell : bash
130
133
- name : Set up pip cache
131
134
if : >-
@@ -165,35 +168,39 @@ jobs:
165
168
if : steps.request-check.outputs.release-requested != 'true'
166
169
id : scm-version
167
170
run : |
171
+ from os import environ
168
172
import setuptools_scm
169
173
ver = setuptools_scm.get_version(
170
174
${{
171
175
steps.untagged-check.outputs.is-untagged-devel == 'true'
172
176
&& 'local_scheme="no-local-version"' || ''
173
177
}}
174
178
)
175
- print('::set-output name=dist-version::{ver}'.format(ver=ver))
179
+ with open(environ['GITHUB_OUTPUT'], mode='a') as github_output:
180
+ print('dist-version={ver}'.format(ver=ver), file=github_output)
176
181
- name : Set the target Git tag
177
182
id : git-tag
178
183
run : >-
179
- print('::set-output name= tag:: v${{
184
+ echo " tag= v${{
180
185
steps.request-check.outputs.release-requested == 'true'
181
186
&& github.event.inputs.release-version
182
187
|| steps.scm-version.outputs.dist-version
183
- }}')
188
+ }}" >> "$GITHUB_OUTPUT"
189
+ shell : bash
184
190
- name : Set the expected dist artifact names
185
191
id : artifact-name
186
192
run : |
187
- print('::set-output name= sdist:: aiomysql-${{
193
+ echo " sdist= aiomysql-${{
188
194
steps.request-check.outputs.release-requested == 'true'
189
195
&& github.event.inputs.release-version
190
196
|| steps.scm-version.outputs.dist-version
191
- }}.tar.gz')
192
- print('::set-output name= wheel:: aiomysql-${{
197
+ }}.tar.gz" >> "$GITHUB_OUTPUT"
198
+ echo " wheel= aiomysql-${{
193
199
steps.request-check.outputs.release-requested == 'true'
194
200
&& github.event.inputs.release-version
195
201
|| steps.scm-version.outputs.dist-version
196
- }}-py3-none-any.whl')
202
+ }}-py3-none-any.whl" >> "$GITHUB_OUTPUT"
203
+ shell : bash
197
204
198
205
build :
199
206
name : >-
@@ -230,14 +237,16 @@ jobs:
230
237
id: calc-cache-key-py
231
238
run: |
232
239
from hashlib import sha512
240
+ from os import environ
233
241
from sys import version
234
242
hash = sha512(version.encode()).hexdigest()
235
- print(f'::set-output name=py-hash-key::{hash}')
243
+ with open(environ['GITHUB_OUTPUT'], mode='a') as github_output:
244
+ print(f'py-hash-key={hash}', file=github_output)
236
245
shell: python
237
246
- name : Get pip cache dir
238
247
id : pip-cache-dir
239
248
run : >-
240
- echo "::set-output name= dir:: $(python -m pip cache dir)"
249
+ echo "dir= $(python -m pip cache dir)" >> "$GITHUB_OUTPUT "
241
250
- name : Set up pip cache
242
251
243
252
with :
@@ -334,14 +343,16 @@ jobs:
334
343
id: calc-cache-key-py
335
344
run: |
336
345
from hashlib import sha512
346
+ from os import environ
337
347
from sys import version
338
348
hash = sha512(version.encode()).hexdigest()
339
- print(f'::set-output name=py-hash-key::{hash}')
349
+ with open(environ['GITHUB_OUTPUT'], mode='a') as github_output:
350
+ print(f'py-hash-key={hash}', file=github_output)
340
351
shell: python
341
352
- name : Get pip cache dir
342
353
id : pip-cache-dir
343
354
run : >-
344
- echo "::set-output name= dir:: $(python -m pip cache dir)"
355
+ echo "dir= $(python -m pip cache dir)" >> "$GITHUB_OUTPUT "
345
356
- name : Set up pip cache
346
357
347
358
with :
@@ -460,12 +471,15 @@ jobs:
460
471
- name : Figure out if the interpreter ABI is stable
461
472
id : py-abi
462
473
run : |
474
+ from os import environ
463
475
from sys import version_info
464
476
is_stable_abi = version_info.releaselevel == 'final'
465
- print(
466
- '::set-output name=is-stable-abi::{is_stable_abi}'.
467
- format(is_stable_abi=str(is_stable_abi).lower())
468
- )
477
+ with open(environ['GITHUB_OUTPUT'], mode='a') as github_output:
478
+ print(
479
+ 'is-stable-abi={is_stable_abi}'.
480
+ format(is_stable_abi=str(is_stable_abi).lower()),
481
+ file=github_output,
482
+ )
469
483
shell : python
470
484
471
485
- name : >-
@@ -474,17 +488,19 @@ jobs:
474
488
if: fromJSON(steps.py-abi.outputs.is-stable-abi)
475
489
id: calc-cache-key-py
476
490
run: |
491
+ from os import environ
477
492
from hashlib import sha512
478
493
from sys import version
479
494
hash = sha512(version.encode()).hexdigest()
480
- print('::set-output name=py-hash-key::{hash}'.format(hash=hash))
495
+ with open(environ['GITHUB_OUTPUT'], mode='a') as github_output:
496
+ print('py-hash-key={hash}'.format(hash=hash), file=github_output)
481
497
shell: python
482
498
483
499
- name : Get pip cache dir
484
500
if : fromJSON(steps.py-abi.outputs.is-stable-abi)
485
501
id : pip-cache-dir
486
502
run : >-
487
- echo "::set-output name= dir:: $(python -m pip cache dir)"
503
+ echo "dir= $(python -m pip cache dir)" >> "$GITHUB_OUTPUT "
488
504
489
505
- name : Set up pip cache
490
506
if : fromJSON(steps.py-abi.outputs.is-stable-abi)
0 commit comments