File tree Expand file tree Collapse file tree 4 files changed +42
-40
lines changed Expand file tree Collapse file tree 4 files changed +42
-40
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 55 branches : ["main"]
66 pull_request :
77 branches : ["main"]
8+ release :
9+ types : [published]
810 # Run the tox tests every 8 hours.
911 # This will help to identify faster if
1012 # there is a CI failure related to a
3840 default_python : " 3.10"
3941 other_names : |
4042 lint
41- packaging
43+ pkg
4244 py38,py38-devel
4345 py39,py39-devel
4446 py310,py310-devel
@@ -183,3 +185,39 @@ jobs:
183185 uses : actions/upload-artifact/merge@v4
184186 with :
185187 delete-merged : true
188+ pypi :
189+ name : Publish to PyPI registry
190+ needs : check
191+ if : github.event_name == 'release' && github.event.action == 'published'
192+ environment : release # approval
193+ runs-on : ubuntu-24.04
194+ permissions :
195+ id-token : write
196+
197+ env :
198+ FORCE_COLOR : 1
199+ PY_COLORS : 1
200+ TOXENV : pkg
201+
202+ steps :
203+ - name : Switch to using Python 3.10 by default
204+ uses : actions/setup-python@v5
205+ with :
206+ python-version : " 3.10"
207+
208+ - name : Install tox
209+ run : python3 -m pip install --user "tox>=4.0.0"
210+
211+ - name : Check out src from Git
212+ uses : actions/checkout@v4
213+ with :
214+ fetch-depth : 0 # needed by setuptools-scm
215+ submodules : true
216+
217+ - name : Build dists
218+ run : python3 -m tox
219+
220+ - name : Publish to pypi.org
221+ if : >- # "create" workflows run separately from "push" & "pull_request"
222+ github.event_name == 'release'
223+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ maintainers = [
2121]
2222license = {text = " MIT" }
2323classifiers = [
24- " Development Status :: 4 - Beta " ,
24+ " Development Status :: 5 - Production/Stable " ,
2525 " Intended Audience :: Developers" ,
2626 " Framework :: tox" ,
2727 " License :: OSI Approved :: MIT License" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ minversion = 4.0.2
33ignore_path = tests
44envlist =
55 lint
6- packaging
6+ pkg
77 py
88 py-devel
99
4242commands =
4343 python -m pre_commit run {posargs:--all}
4444
45- [testenv:packaging ]
45+ [testenv:pkg ]
4646description =
4747 Test packaging
4848# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
You can’t perform that action at this time.
0 commit comments