@@ -3,46 +3,40 @@ name: release
3
3
on :
4
4
release :
5
5
types : [published]
6
+ workflow_dispatch :
6
7
7
8
jobs :
8
9
pypi :
9
10
name : Publish to PyPI registry
10
11
environment : release
11
12
runs-on : ubuntu-24.04
13
+ permissions :
14
+ id-token : write
12
15
13
16
env :
14
17
FORCE_COLOR : 1
15
18
PY_COLORS : 1
16
19
TOXENV : packaging
17
- TOX_PARALLEL_NO_SPINNER : 1
18
20
19
21
steps :
20
- - name : Switch to using Python 3.10 by default
21
- uses : actions/setup-python@v5
22
- with :
23
- python-version : " 3.10"
24
- - name : Install tox
25
- run : >-
26
- python3 -m
27
- pip install
28
- --user
29
- tox
30
- - name : Check out src from Git
31
- uses : actions/checkout@v4
32
- with :
33
- fetch-depth : 0 # needed by setuptools-scm
34
- - name : Build dists
35
- run : python -m tox
36
- - name : Publish to test.pypi.org
37
- if : >- # "create" workflows run separately from "push" & "pull_request"
38
- github.event_name == 'release'
39
-
40
- with :
41
- password : ${{ secrets.testpypi_password }}
42
- repository_url : https://test.pypi.org/legacy/
43
- - name : Publish to pypi.org
44
- if : >- # "create" workflows run separately from "push" & "pull_request"
45
- github.event_name == 'release'
46
-
47
- with :
48
- password : ${{ secrets.pypi_password }}
22
+ - name : Switch to using Python 3.10 by default
23
+ uses : actions/setup-python@v5
24
+ with :
25
+ python-version : " 3.10"
26
+
27
+ - name : Install tox
28
+ run : python3 -m pip install --user "tox>=4.0.0"
29
+
30
+ - name : Check out src from Git
31
+ uses : actions/checkout@v4
32
+ with :
33
+ fetch-depth : 0 # needed by setuptools-scm
34
+ submodules : true
35
+
36
+ - name : Build dists
37
+ run : python3 -m tox
38
+
39
+ - name : Publish to pypi.org
40
+ if : >- # "create" workflows run separately from "push" & "pull_request"
41
+ github.event_name == 'release'
42
+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments