@@ -24,17 +24,17 @@ jobs:
24
24
fail-fast : false
25
25
26
26
steps :
27
- - uses : actions/checkout@v2
27
+ - uses : actions/checkout@v4
28
28
29
29
- name : Set up Python 3.11
30
- uses : actions/setup-python@v2
30
+ uses : actions/setup-python@v5
31
31
with :
32
32
python-version : ' 3.11'
33
33
34
34
- name : Install dependencies
35
35
run : |
36
36
python -m pip install --upgrade pip
37
- pip install --editable .
37
+ python -m pip install --editable .
38
38
39
39
build_sdist :
40
40
name : sdist on ${{ matrix.os }} with py ${{ matrix.python-version }}
@@ -46,12 +46,12 @@ jobs:
46
46
python-version : ['3.9', '3.10', '3.11', '3.12']
47
47
48
48
steps :
49
- - uses : actions/checkout@v2
49
+ - uses : actions/checkout@v4
50
50
with :
51
51
fetch-depth : ' 0'
52
52
53
53
- name : Set up Python ${{ matrix.python-version }}
54
- uses : actions/setup-python@v2
54
+ uses : actions/setup-python@v5
55
55
with :
56
56
python-version : ${{ matrix.python-version }}
57
57
67
67
python -m coveralls --service=github
68
68
69
69
- name : Build sdist
70
+ if : matrix.os == 'ubuntu-latest'
70
71
run : |
71
72
python -m build
72
73
@@ -78,27 +79,27 @@ jobs:
78
79
upload_to_pypi :
79
80
needs : [build_sdist]
80
81
runs-on : ubuntu-latest
82
+ permissions :
83
+ id-token : write
84
+ contents : read
81
85
82
86
steps :
83
- - uses : actions/download-artifact@v4
87
+ - name : Retrieve release distributions
88
+ uses : actions/download-artifact@v4
84
89
with :
85
90
name : artifact
86
- path : dist
91
+ path : dist/
87
92
88
- - name : Publish to Test PyPI
93
+ - name : Publish test to Test. PyPI
89
94
# only if working on master
90
95
if : github.ref == 'refs/heads/master'
91
96
uses : pypa/gh-action-pypi-publish@release/v1
92
97
with :
93
- user : __token__
94
- password : ${{ secrets.test_pypi_token }}
95
- repository_url : https://test.pypi.org/legacy/
96
- skip_existing : true
98
+ repository-url : https://test.pypi.org/legacy/
99
+ skip-existing : true
100
+ # verbose: true
97
101
98
- - name : Publish to PyPI
102
+ - name : Publish release to PyPI
99
103
# only if tagged
100
104
if : startsWith(github.ref, 'refs/tags')
101
105
uses : pypa/gh-action-pypi-publish@release/v1
102
- with :
103
- user : __token__
104
- password : ${{ secrets.pypi_token }}
0 commit comments