25
25
name : Build sdist
26
26
runs-on : ubuntu-22.04
27
27
steps :
28
- - uses : actions/checkout@v3
29
- - uses : actions/setup-python@v4
28
+ - uses : actions/checkout@v4
29
+ - uses : actions/setup-python@v5
30
30
name : Install Python
31
31
with :
32
32
python-version : ${{ env.python-version }}
36
36
- name : Build sdist
37
37
run : " python setup.py sdist && ls -l dist"
38
38
39
- - uses : actions/upload-artifact@v3
39
+ - uses : actions/upload-artifact@v4
40
40
with :
41
+ name : artifacts-sdist
41
42
path : ./dist/tornado-*.tar.gz
42
43
43
44
build_wheels :
@@ -49,54 +50,58 @@ jobs:
49
50
os : [ubuntu-22.04, windows-2022, macos-12]
50
51
51
52
steps :
52
- - uses : actions/checkout@v3
53
- - uses : actions/setup-python@v4
53
+ - uses : actions/checkout@v4
54
+ - uses : actions/setup-python@v5
54
55
name : Install Python
55
56
with :
56
57
python-version : ${{ env.python-version }}
57
58
- name : Set up QEMU
58
59
if : runner.os == 'Linux'
59
- uses : docker/setup-qemu-action@v2
60
+ uses : docker/setup-qemu-action@v3
60
61
with :
61
62
platforms : all
62
63
63
64
- name : Build wheels
64
- uses : pypa/cibuildwheel@v2.12.1
65
+ uses : pypa/cibuildwheel@v2.18
65
66
66
- - uses : actions/upload-artifact@v3
67
+ - uses : actions/upload-artifact@v4
67
68
with :
69
+ name : artifacts-${{ matrix.os }}
68
70
path : ./wheelhouse/*.whl
69
71
70
72
upload_pypi_test :
71
73
name : Upload to PyPI (test)
72
74
needs : [build_wheels, build_sdist]
73
75
runs-on : ubuntu-22.04
74
76
if : github.repository == 'tornadoweb/tornado' && github.event_name == 'workflow_dispatch'
77
+ permissions :
78
+ # This permission is required for pypi's "trusted publisher" feature
79
+ id-token : write
75
80
steps :
76
- - uses : actions/download-artifact@v3
81
+ - uses : actions/download-artifact@v4
77
82
with :
78
- name : artifact
83
+ pattern : artifacts-*
79
84
path : dist
85
+ merge-multiple : true
80
86
81
- - uses : pypa/gh-action-pypi-publish@v1.5.0
87
+ - uses : pypa/gh-action-pypi-publish@release/v1
82
88
with :
83
- user : __token__
84
- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
85
- repository_url : https://test.pypi.org/legacy/
86
- skip_existing : true
89
+ repository-url : https://test.pypi.org/legacy/
90
+ skip-existing : true
87
91
88
92
upload_pypi :
89
93
name : Upload to PyPI (prod)
90
94
needs : [build_wheels, build_sdist]
91
95
runs-on : ubuntu-22.04
92
96
if : github.repository == 'tornadoweb/tornado' && github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
97
+ permissions :
98
+ # This permission is required for pypi's "trusted publisher" feature
99
+ id-token : write
93
100
steps :
94
- - uses : actions/download-artifact@v3
101
+ - uses : actions/download-artifact@v4
95
102
with :
96
- name : artifact
103
+ pattern : artifacts-*
97
104
path : dist
105
+ merge-multiple : true
98
106
99
- - uses : pypa/gh-action-pypi-publish@v1.5.0
100
- with :
101
- user : __token__
102
- password : ${{ secrets.PYPI_API_TOKEN }}
107
+ - uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments