@@ -3,46 +3,40 @@ name: release
33on :
44 release :
55 types : [published]
6+ workflow_dispatch :
67
78jobs :
89 pypi :
910 name : Publish to PyPI registry
1011 environment : release
1112 runs-on : ubuntu-24.04
13+ permissions :
14+ id-token : write
1215
1316 env :
1417 FORCE_COLOR : 1
1518 PY_COLORS : 1
1619 TOXENV : packaging
17- TOX_PARALLEL_NO_SPINNER : 1
1820
1921 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- uses : pypa/gh-action-pypi-publish@v1.8.14
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- uses : pypa/gh-action-pypi-publish@v1.8.14
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